I am new to HERE MAP and GIS, is there an API to retrieve the administrative groups per parent, i.e:
Api to get all States by Country
then to get all Counties per State
then all Cities per County
finally all Districts per City
All this without any coordinates - the result is needed to perform a cascade search in my database by selecting country, state and county, not related with any position.
Related
Here in Italy the land is politically divided into regions, provinces and municipalities. For example I live in the city of Varazze, whose province is Savona, in the region of Liguria.
I created a Firestore database that accepts businesses whose addresses are composed like the example up here. Nothing difficult as I use an external service which give me consistent and correct geo data. The rest of the information for the business is entered by the user.
Now I need to search into this db of businesses by region and/or province and/or municipality. To set up the UI with the filter, I absolutely need to show only regions, provinces and municipalities that have a business into the db and not all those available (FYI: Italy has 21 regions, 107 provinces and ~8000 municipalities).
Looking down the internet and here on SO, I understand that the best strategy is to create a new collection to store distinct data about the location, separated from the businesses collection, in order to enable a quicker lookup. So every time I add or edit a business I check if it's region, province and municipality exists in the "search collection" (let's name this way) and if not, add it.
But how to structure this collection?
If I use the municipality as key, I'll have a quick lookup for the municipality itself (at top will be 8000 records), but if I need to search by a region or province the result is poor because firestore does not have any way to "distinct" the results (something like SELECT DISTINCT province FROM geocollection WHERE Region='Liguria' if you want to visualize it in SQL) and I have to do it on a server or at worst on the client (not an option this last one).
I don't know if staring with the region and keeping the structure region -> province -> municipality is the way to go. Or going for the province, being halfway between.
Another way could be to have separate collection for regions, provinces and municipalities.
What I'm asking here is what is the best solution, in terms of performance and data complexity.
A good way to go on this would be to have a collection Regions, then each Region has a Collection Provinces, and each province has a collection Municipalities.
And the documents have the name of the geografic region as ID, This will allow you to lookup by the ID on the corrisponding collections.
I would like to analyse the locations of electric vehicle charging stations for Germany, Italy and France. Those three countries, because they differ quite a lot in regard to their respective incentive programmes for public charging station infrastructure.
What I have so far are .csv exports from both OpenChargeMap and OpenStreetMap containing the location data (latitude and longitude) of all charging stations in those three countries along with a few other information that I can process in R.
What I would like to do now is some sort of reverse geocoding on those latitude and longitude coordinates to retrieve additional information on the surroundings. Especially, whether the respective charging station is located in a residential area in a city for example or at a rest stop on the highway. By knowing at what kind of locations the charging stations are placed in those three countries I am hoping to be able to draw conclusions regarding the incentive programmes. I'm not looking for specific addresses in this case, but rather an API or another way to process thousands of coordinates and retrieve information regarding for example population density or any other piece of data from which I could derive conclusions.
I have tried to get OpenStreetMap exports to work, but unfortunately I cannot seem to be able to query for the 'landuse' attribute through the Overpass Turbo API. This is my basic query that I'm using in this specific API, but as soon as I query for ["landuse" = "residential"] instead of ["landuse" = ""] I get prompted empty fields as result.
I found an API from Google which would offer lookup for various address components/types. Unfortunately, registering an API key at Google is not quite realistic for the scope of my work. Does somebody know of a (preferably FOSS) API that is able to do something like this? Or even how to make a 'landuse' query work in the Overpass Turbo API linked above?
Thank you in advance for your time.
Your Overpass API query is looking for elements that are tagged as amenity=charging_station and landuse. This is rather uncommon since charging stations and landuse are mapped as distinct objects. Instead you need to look around charging stations for landuse elements.
So instead of
area["ISO3166-1"="DE"]->.a;
nwr(area.a)["amenity"="charging_station"]["landuse"=""];
you will need a query like
area["ISO3166-1"="DE"]->.a;
nwr(area.a)["amenity"="charging_station"];
way(around:200)["landuse"];
This searches for ways with a landuse tag located within 200 meters of charging stations.
Note that this is a rather heavy query. You should probably use your own Overpass API server for it.
We have a report that is populated by different platforms (Salesforce, DB etc.) and now we are going to add Analytics data to that.
In our report for Spain, we use 'Province' values (Madrid, Barcelona, Málaga).
When I am getting data from Google Analytics, there are dimensions: Region and City but the problem is, values of Region are Autonomous Communities+Cities and values of City are Municipalities.
Is there any field/dimension I can use to group my data by Provinces?
There's no built-in dimension for that. All you can do is to build an almost 100% matching table using Google Ads geo targets table from here https://developers.google.com/adwords/api/docs/appendix/geotargeting
the underlying table
(consider checking for proper language version)
I am attempting to determine if a U.S. address is within city limits or not. (Another example is if an address resides within a particular county or not).
For example, we are creating a website allowing a city to sell its pet licenses. If, for example, the address is for W. Lafayette, Indiana, but the home is just outside of the established city limits, we want our website to be able to notify the user that they do not need to buy a pet license (otherwise when the city sees it, they need to refund that money to the pet owner).
Google Maps obviously knows city boundaries. For example, when you view W. Lafayette, IN, on the map you can see a red line and light red shading showing the city limits: (example)
My question: how do I determine if an address is contained within that bordered area? (I'm hoping for perhaps the ability to send lat/lng to an API to determine if it is contained within that region... or some other ideas as to how to do this?)
Side note: postal code is not enough. There are many instances where an address can have a city, state, zip that is the same whether the home is in or out of city limits.
Thank you.
Tom
I'm looking for database with geo-data about city districts for all cities of the Europe.
I have plans to use it in my google-maps based appication.
For example, if you try to search with query "Paris, Paris 11" at Google Maps, you will see the highlighted area of Paris-11 district.
I've already found great database with country regions polygone: https://www.google.com/fusiontables/DataSource?dsrcid=420419
Can anybody help me with same database for city regions?
Or maybe google maps api has some method to receive polygonal coordinates of selected city district?
PS all national earth data-tables are stored here: https://www.google.com/fusiontables/DataSource?dsrcid=394713