I built out territories in MapPoint based on zip code grouping. Is there a way to export the long/lat of the territory boundaries? I know MapPoint knows the coordinates, but I can't find a way to export them.
If this capability is not available in MapPoint, is there another way/tool to get the boundary coordinates? I know of DrawingTool for Tableau, but that is manual drawing and there is no way to save and edit the map later.
In Tableau the Latitudes,Longitudes are auto generated for a geo dimension.
If you want to export the details you can follow below steps.
1: Right click on the view
2: Click on view data
3: Click on export all
4: save the exported file.
No MapPoint does not expose the boundary coordinates of any of the geographies (eg. zipcodes) in its database.
Territory export is also limited, as you've probably found. The API is even worse - you can't even query the individual component geographies (eg. which zipcodes make up each territory).
Might be overkill for you (being a full GIS), but Caliper's Maptitude 2016 has new territory functionality that is reminiscent of MapPoint's territories, but fixes the various problems that MapPoint had. It can also import territories from MapPoint PTM files.
Related
The below linked map contains a number of layers which I would like to be able to extract as polygons [if possible]. I've not previously done any web-scraping and realise that doing so in regards to the geographic data on this system represents a significant challenge.
Ideally I would only want to extract the data relating to the 'Shopping Local Centre' category.
Happy to try to use Phython or R to achieve such, just wondered if anyone had any ideas.....
Web scraping (using BeautifulSoup, for example) would get you the HTML objects from a webpage. You would need basic knowledge of Python for this.
Or you could avoid that by going this route:
With QGIS and Geofabrik you can gather retail location polygons and their attributes of a given area.
Use Geofabrik to download your area of interest in *.shp (shapefile) format. It looks like you're in Greater Manchester, so I navigated to the download page here (it's a 50MB file for the greater-manchester-latest-free.shp.zip).
Once you download that, open it in QGIS and you'll see in the attributes it has retail locations.
That site is using WMS to display the map (I work for the company that makes iShare) so there is no vector content for you to scrape as it works entirely with images.
The easiest way to get the data would be to ask the council to provide it, you might need to make it a freedom of information request but they should be happy to provide the data in a usable GIS format.
I want to get all tourist attractions around a zip code in the US. How do I do that from OpenStreetMap api?
I have found this http://wiki.openstreetmap.org/wiki/Key:tourism
But I'm not sure how to use it.
http://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=json&polygon=1&addressdetails=1&tourism=attraction
You can use overpass turbo e.g. with the query wizard to show for the current bounding box the available objects.
To do this for a zip code instead of a bounding box this is much more complicated even in a properly mapped region like Germany, because to my knowledge there are no relations (or very rarely) that map a zip code to a boundary polygon. You could obtain several addresses with zip codes and then create a kind of a boundary for it but that won't be very precise. Regarding US you also have probably less features like zip code mapped due to the Tiger import (less mapping activity), not sure.
I have been reading the google maps api and the openstreetmap api, but i cannot find if they offer the following functionality:
I need to find out if at a specific gps coordinate there is a building or a street.
Do you know of any api offering this?
Thanks.
I wonder how you could missed that if you already did look at the documentation.
Of course OpenStreetMap can do this. There is the main API (which is primarily for editing and not for bulk querying!) where you can retrieve all map data within a specified bounding box.
Example:
http://api.openstreetmap.org/api/0.6/map?bbox=13.76500,51.05600,13.76515,51.05615
This will return all objects between latitude 51.05600 and 51.05615 and longitude 13.76500 and 13.76515. For how to interpret the returned XML file read OSM XML in the OSM wiki.
In order to know if a specific object is a building, a street or something else you have to look at the tags. Buildings are usually tagged using the building key and can either be a single node, a way or (rarely) a relation. Streets are usually ways and are tagged using the highway key.
I have been interested in map reporting, so I wanted to create a map report with drill down functionality, so basically created two reports as follows:
a) Main report based on SQL Server Spatial data for showing US States wide sales
b) Drill down map report based on ESRI shapfile for showing US Counties sales for the selected state
I downloaded the US Counties ESRI shapefile.
Once I was done with the reports, I tested the map with drilldown functionality. I previewed the main report, hover the mouse over Texas and I don't see the counties for Texas state. I see only a map of the US with tiny dots.
So, I am not sure what I missed. I chose County Name column from the spatial data and also the county name from the analytical dataset. Is it the ESRI shapefile?
Please advise.
To my knowledge SSRS does not support 'hover over' features only an 'action' feature. The action can go to a hyperlink, go to a report, or go to a section. To do a drill down for a report, even if it is geographic you need to have a reference to something you can pass to something else. I recently did something similar to what you are asking though. You can make a 'subreport' that dynamically gets created from a geographic data type that represents states. What I did:
I downloaded a program that takes Census shape files and puts them into a SQL database:
http://www.sharpgis.net/page/sql-server-2008-spatial-tools.aspx
I got a shape file of the counties of the US from the Census.
I created a database called 'Spatial'
I created a table and inserted data into it from step 1's app called 'Counties'
I created a generic US map as my 'Main' report, using the geographic options for the US.
I created a subreport of a map type but chose the spatial data wizard. The options are not that important to get started but HOW you make the image. This report gets it's data from the 'geographic' column of the table I made so the query would be like this(ensure to have a datasource go to the Spatial Database):
Select StateName, Counties, geog(geographic type)
from UsCounties
where StateName = #State
The report when done looks like a blob, because it is created at run time, not statically. You can 'preview' it and pass in a state like 'OR' or 'WA' from a variable that should be created called 'State'. If it was not auto created you may do so and make it a 'Text' variable. It will display the state shape if it was set up correct.
You may go back to the report in step 5 and then go to the 'Polygon Properties' of the layer you created.
Select the 'Action' pane on the left. Choose 'Go to report', specify the sub report you created, the report will want a variable match for 'State' the generic US state has an 'Abbreviation' that corresponds to the state two digit code.
Now you should be able to run the main report and when you click anywhere in a state it will 'drillthrough' to a report that is created at runtime from the spatial database. This is vector based so it is fairly quick depending on your hardware hosting your machine and how much data you show.
Keep in mind that with SSRS it is hard to make it have some 3d features and hover over for some reason is completely ignored for objects but is relegated to only 'tooltips' which you can load up with functions to give text and numbers but not much more. There is a hack I wrote in another place of how you can use javascript to pop out a window, but under the hood you are really just doing a drill through presented differently.
I have a scenario where I have to highlight borders and shade a state or city after geocoding it (when I got the lang and lat).
How can I do this, do I need to have a complete information of a city to surround it with polylines? Or is there a way that map API can do this for me.
True. Google does not provide this feature. So what we can do... we can have the lat/long of the borders of the state. And we have to draw polygons ourselves.
I used this JS object. And changed it to Google map object (google.maps.LatLng).
For example:
var statesobj = {"AK": [new google.maps.LatLng(70.0187, -141.0205),
new google.maps.LatLng(70.1292, -141.7291),
new google.maps.LatLng(70.4515, -144.8163)]}
So, it's easy now. Loop on these lat/longs. And you can draw the polygons on every state of US.
So this is the solution I came up. If you guys know some better idea to do it. Please share.
You can also try Google Geo Charts:
http://code.google.com/apis/chart/interactive/docs/gallery/geochart.html
Google Maps API doesn't allow you to retrieve city borders. There are a couple other places from which you can get the coordinates, though:
Flickr API
There is a Flickr API based on photos that people tag, but it's only as accurate as the people who tag photos: so it's good enough for bootstrapping but probably not for production: http://karya-blog.blogspot.com/2012/12/fetching-city-polygons-with-flickr-api.html
Natural Earth Data
An accurate alternative is www.naturalearthdata.com. To get that data from there you just need to make two requests: one with the city name and one with their ID to get the parameters:
unlock.edina.ac.uk/ws/search?name=berlin&gazetteer=naturalearth&format=json
and then
unlock.edina.ac.uk/ws/footprintLookup?format=json&identifier=14126951
and you're set :)
Mapzen
If it's possible for you to pre-fetch the data, go for Mapzen, they have a full and pretty accurate database: https://mapzen.com/data/borders/
I'm afraid google maps API doesn't provide any means to access region (country, state, city, ...) shapes.
If you want to highlight regions you have to create custom overlays based on data acquired elsewhere.
Now the basic map example includes a "mashup" of data. When identifying data is fed to the web service, the resulting output can pinpoint locations on the map.
It shows how a geographic Map Marker is placed on the map to identify a specific location. Map Markers can use the default icon (shown) or a custom image, gauge, or even a chart. Optionally, the map can be configured to display a Map Marker Info window, containing additional location-specific data, when the marker is clicked.
It includes data-driven, colored regions (in this case, representing postal codes) overlaid a map of eg Washington, DC. Logi Info can work with GIS boundary data to produce region overlays for states, counties, cities, school districts, and other areas. Like the Map Marker, regions can be clicked to display a pop-up information window with detail data.