Creating region-based data and use the data if a point (GPS-coordinate) falls under a region - node.js

I was trying to implement a feature where if a user books a particular location for service, the pricing should be based on the data that is already configured for that region. The region could be an establishment, street, city, town or even a country.
I have tried to make use of Google-place-details API to create the region-based data with Place Types information.
Eg: For creating a region-based data pricing for Washington State, will receive place type information such as administrative_area_level_1, country etc.
And if a person chooses a place inside the Washinton state, from the Google-place-details API, Place Type information can be received which can be used to match if the particular location falls into that region.
I'm unsure since its completely depending upon google APIs and any expendability issues later.
Are there any other generic ways to look into or
should I implement this feature with bounding box co-ordinates to determine the region. Please share your thoughts on this.

Related

Where can I find names of regions in cartographic report in IBM Cognos Analytics?

I have a map report in Cognos Analytics. It pulls up the names of the regions from the database. However, not all region names correlate with those stored in the Cognos database. For example, he does not see the region "Moscow" anywhere.
I tried to correct the names of values ​​at the report level, for example, if the database says "Moscow - a city of federal significance", through CASE I prescribe "Moscow" or "Moscow - the capital of Russia" and other variations of the name of the region. However, Cognos does not recognize it.
Tell me, please, where can I found the names of the regions in Cognos?
I suspect you have set the map visualization to use Regions or Point. You'll need to ensure that whatever data item is in the Locations box contains values that MapBox recognizes as regions (country, state, county) or points (city). Spelling of these locations probably depends on the locale you're using to access MapBox.
Alternatively, IBM provides documentation describing how to create your own MapBox content:
https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=maps-setting-up-mapbox-work-cognos-analytics
And don't forget to review the Cognos Analytics 11.0.5 Mapping and Visualization FAQ for more information.

Blockchain Application Architecture: UML & Use Cases

For my internship, I need to implement a blockchain based solution to manage a drug supply chain. The management of this supply chain implies to track-and-trace (geolocate) a drug on the chain, but also to monitor the storage temperature to see if the cold chain is respected. For that I created a mock-up of the POC my Dapps (https://balsamiq.cloud/sum5oq5/p8lsped)and also I wanted to prepare myself by doing a UML and a use cases. However, I didn't find a lot of information about blockchain's UML and use cases besides two literatures which were quite different, so I don't know if what I did was correct or not...
The users of my Dapps will be the following ones:
The stakeholders (Manufacturers, Distributors and Retailers) which will use the Dapps to place orders and also monitor them. They also can search in the historic a specific order. Finally, trough IOT sensors they update the conditions of the order (temperature & location).
The administrator which roles is to update the Dapps and its rules. But also to add or delete user while also defining the rights that they have on the blockchain (I intend to use a permisionned blockchain). Finally, they are also here to help in case of technical problem.
The Dapps that I'm thinking about works in the following:
A user, the customer, can place an order (a list of products) to a
certain seller and choose the final destination of the order.
The order is then put together before being shipped or stocked in the
depots of one of the stakeholders (distributor or retailer) with a
description of the stocking and/or shipping condition of the product
(for example the product must be stocked or transported in a room
with a temperature of less than 5°C). During the shipping and
storing, an IOT device will feed the drops with the temperature and
geolocation of the product by updating the data each 5-10mn.
Obviously they will be a function that allows all the users to see
the history of the order passed and search inside a specific order.
In case where the temperature doesn't respect the temperature
recommended, then the smart-contract send an alert. The same if the
collocation of the product is "weird" like being in some European
countries and not in an Asian country, an alert will be sent again by
the smart-contractual. Finally, in the case where the product is sent
to the asked location by the customer, then the money for the order
will be paid to the seller.
So based on what I explained, I came here in hope that someone tell me if the use cases and UML that I did were correct or not.
I thank in advance anybody who'll take the time to help me.

Is this Use Case correct?

Its my first time making a use case and this is for my coursework.
I had to follow the case study below.
Case Study 8: Warehouse Control System (WCS)
A warehouse distributes health food and related products. Customers order a particular
product and quantity from the warehouse. The Warehouse Control System WCS saves the
order and provides to the customer the order number. The WCS generates a pick list and
shopping label, which tells the order-picker person how many of each item to pick to fulfil
the order. The order-picker picks the items, places them in the box, and places the shipping
label on it. The order-picker then uses the WCS to specify whether the order is ready or
not. Then the manager sends the order number, address, and the payment data to the
shipping company. At the end of the day, the shipping company arrives to pick up all the
orders. The inventory of the product in stock is carried out by the staff, but in others, it is
outsourced to an external company. Each staff has a specific function which is either to
raise an order or check the re-order level of the products in stock.
The company wants to create a computer system that allows employees and external
companies to access the application system on desktop. Model, design and implement a
GUI client that can access the database using Visual Studio or any other software
development package. The database must be designed from the class model and the entity
data model using MS Access or Oracle database.
I'm not sure: should the Warehouse Control System (WCS) be an actor ? If not how to make the use case without it?
Here the use case I made:
The WCS is the system under consideration (the blue boundary).
Some observations:
Use verb-subject(-object) to name use cases
Order ready and the like are no use cases
Try to not start functional decomposition (like it seems you did with that Order ready
I recommend to read Bittner/Spence about use cases as usual.

Context level DFD

So, not really sure if this is the right place for this but I have this current Context level data flow diagram for the bellow specification extract and I have never done one before so I was wondering if it was correct or if it needs fixing? any help appreciated
This is a link to a screen of my current one http://i.imgur.com/S4xvutc.png
SPECIFICATION
Currently the office staff operate the following processes:
Add/Amend/Delete Membership
This is run on-demand when a new membership application is received or when a member indicates that he/she wishes to make amendments to their details. It is also run in those rare instances when a membership is terminated at the discretion of the manager. A new member has an ID number allocated (simply incremented from the previous membership accepted). A membership balance is also maintained for accounting purposes.
Another process operates in a similar fashion on data associated with transfer partners.
Monthly Maintenance
This is run on the last day of each month to issue requests and reminders for subscriptions due, and to remove memberships where fees remain outstanding. Standard letters are also generated. Membership balances are updated as appropriate.
Payment Updates
This is run prior to the Monthly Maintenance, with membership balances being updated accordingly.
Payments to partners are also disbursed at this time.
New Member Search
This is run whenever a new member has been added to the database. The partners are partitioned in terms of vehicle category and location. Normally, there is a limited choice of partner in a particular location (if, indeed, there is any choice) but for some popular destinations, several partners are involved in providing the airport transfer. Thus, a search is then made through the appropriate section for potential matches in the following manner:
A search is then made on the grounds of sex (many female passengers in particular prefer a driver of their own sex, especially if travelling alone or in couples).
Matches are then selected according to factors such as cost (if available), availability of extra requested facilities (such as child seats, air-conditioning etc.)
Existing Member - Additional Searches
These are run on-demand in the same fashion as for a new member's search. Members may of course request any number of such searches, but a separate payment is due for each.
All financial transactions (payments) are also posted to the separate Accounts file, which also stores other financial details relating to running costs for the consideration of the firm's accountants at the end of the financial year.
Thanks for any help, regarding this level 0 Context only DFD
It needs some fixing.
The most obvious flaw is that you use verbs in your dataflows. In some cases this can be fixed easily by just discarding the verb. Return balance and status is not a datflow, but balance and status is.
In others cases it is not so easy. Check Balance, is it outstanding? sounds more like a Process than a dataflow. It looks like Accounting is responsible for doing that job. So will Accounting produce a list of outstanding balances? Or will it return a single balance and status, and if so, based on what input? Will your Airpot Transport System send a list of balances to check to Accounting?
Take for example Monthly Maintenance. What matters is that you want
requests and reminders for subscriptions due
Standard letters
These need to be visible in your DFD
The fact that you want to remove memberships where fees remain outstanding, probably has not place in the toplevel diagram, because that looks like an internal affair.
In general, focus on what the System produces. Maintaining internal state is secondary, is is a necessity to produce the desired output.

Allowing Users to create custom groups of Countries

I'm working on a project for a customer, and one of the requirements is that Users should be allow to assign to each Product (in their case, a Node) a Country or a Region, where the Region is simply a group of Countries, not necessarily in the same area.
I've seen there are many different ways to manage a list of Countries, often suggesting to use Taxonomy for them, but I can't figure out how could I allow users to create these "Regions". To make things complicated, customer wants to have a simple interface, where only one field is present on the form. In this field, Users must be able to choose either a Country or a Region.
Perhaps I could implement everything using Nodes, i.e.:
- Country Nodes
- Region Nodes, with a multiple-valued Node Reference to Country Nodes
But I wonder if that would not be too heavy...
I hope the issue is clear, if not feel free to ask and I'll try to explain it better. Thanks for all suggestions.
I ended up creating my own tables and code to handle the whole thing, as I couldn't find any better solution. I used tables from IP2Country module as a source for Country Codes.

Resources