Extract open street map data for a specific region - openstreetmap

I have openstreet data for a specific state. Now I want to extract the data for a city in that city. What sort of tools are available for that?

There are several tools for extracting a region from a file with OpenStreetMap data. Popular options are
Osmosis - see the wiki page's "Example Usage" section for examples of extracting bounding boxes and polygon areas
Osmconvert - see the "Clipping based on Longitude and Latitude" and "Clipping based on a Polygon" sections
In both cases you need to create or obtain a file containing the city's boundary if you want to accurately extract a polygon area.

You could also try the following web site which is very good at extracting information from open street maps it's the xapi
http://overpass-turbo.eu/
I found it to be good and quick and you can define an area to be searched i.e resizing the boundary box and you can export your retrieved data.

Related

Google Data Studio Geo Map stays blank while using Lat,Long as Dimension

I want to use Google Data Studio to visualize the location of NGO´s in Europe. Some of these share the same HQ Location in the Data e.g. Italy Rome. Idea is to transfer these into Lat,Long coordinates and slightly manipulate the values to show them with their name in the GMaps bubble diagram. The original data is unfit, because the digram cannot display multiple tooltips/names for the same location.
I have been following this guide https://michaelhoweely.com/2020/05/04/how-to-build-a-custom-google-map-in-data-studio-using-google-sheets-and-geocode/ to do the Geo Coding of the locations.
Problem is that the Geo Chart goes blank if I choose Lat,Long as the location dimension. Even the original data (not modified by me) will cause the same issue.
GDataStudio_Lat_Long_Vis_Issue
Any idea of what I am doing wrong here or having a better idea of how to do the visualization?
You also have to make sure you change the type to GEO, as it sometimes defaults to ABC or numeric.
It may help to concatenate the latitude and longitude values to follow the WKT format, as shown below.
CONCAT(<longitude_column>, ", ", <latitude_column>)
In the current state, the latitude and longitude are reversed, so the error is probably caused by each value exceeding the default range for latitude and longitude.

Plotting maps dynamically based on the availability of geographical data

I have a table with House, Streetname, City, Post code, Country, Latitude and Longitudes. As the latitude and longitudes will not be available for all the addresses, I would like to implement a logic in tableau that will use the co-ordinates (if available in the data), otherwise, Tableau has to plot the maps based on country and post code.
The dashboard that I am using currently is plotting the maps based on Country and Post code only. Is there a possibility to implement the logic explained above, to make the dashboard even more better? Please help.
Thanks,
Ram
If you want to get map according to your requirement as citywise or zipcode wise etc
Follow the steps as under:
Step1:
[map according to city]
as https://i.stack.imgur.com/in38c.png
It will automatically change the map according to zip code etc

How can I create a filled map with custom polygons in Tableau given point data?

In one TDE, I have individual posts from a hyperlocal social network with lat/long data. In the other TDE, I have polygons for Chicago's community areas.
How can I shade those community areas according to the number of records that were posted within its boundaries?
I'd like to essentially look up the community area by lat/long since I don't have the community area data within the first TDE to perform a join. Is there some other way to generate these shaded polygons given the data I already have? Is there another mapping tool that could do this for less than hundreds of dollars, if Tableau is not the answer?
Here's my workbook on Tableau Public.
You could load both data sets into Postgres. Add the PostGIS extension, so you can do geospatial queries to map posts to polygons. The connect Tableau to Postgres to create your visualization. One step at a time.

Place a marker in each country with mapbox

I am using Mapbox to build a multiple choropleth map.
Something along the lines of this example, https://www.mapbox.com/mapbox.js/example/v1.0.0/choropleth-joined-data-multiple-variables/
I am using countries instead of US states however.
I've got the map working and I can switch between layers
I have an extra requirement however to add a marker in each country that displays how many projects are active in that country.
I found out how I can add custom markers to the map with this example, https://www.mapbox.com/mapbox.js/example/v1.0.0/divicon/
The problem is I need to put a marker in the center of each country.
Does anybody know a way to put a marker in the middle of each country?
I tried to use the natural earth admin 0 label points data but that has multiple points per country. It looked like the 'scalerank=0' points were the middle of the countries but if I filter on these points, I still get multiple points for some countries (russia has 4 for instance, but Belgium has 4 as well).
If you plot all scalerank 0 points on a map you get the following result:
https://a.tiles.mapbox.com/v4/persyval.jg5p7gm7/page.html?access_token=pk.eyJ1IjoicGVyc3l2YWwiLCJhIjoiX3lrSTNYYyJ9.6Ps4OlBCYmlkxQksKsGb7A#6/45.159/12.206
Does anybody know about a dataset that has one point per country or another way to put a marker in the center of each country with mapbox?
It seems it's hard to find a list of country points for the placing of markers.
So I took the mentioned admin labal 0 points and tried to sanitize it to have only one appropiate marker per country.
The result can be downloaded here in GEOJSON format:
https://drive.google.com/file/d/0B6IQhfb-UYeUYk1mcUZaMmV0S1U/edit?usp=sharing
If you want to have a visual representation of the points take a look at this map:
https://a.tiles.mapbox.com/v4/persyval.jgk4767c/page.html?access_token=pk.eyJ1IjoicGVyc3l2YWwiLCJhIjoiX3lrSTNYYyJ9.6Ps4OlBCYmlkxQksKsGb7A#4/36.49/34.32
I needed this points for a proof of concept project so I haven't checked all markers meticulously, I also haven't taken account some of the more political sensitive country borders.
If you have a project in which this is of importance please check the file before using, but the points in this file can be easily edited to your own preferences.

qgis (segment (link) start node and end node id's extraction from shapefile )

I have been dealing with a lot of shape files editing tools last month..
I tried to get two dbf files from shape file (one for nodes and one for links) in an appropriate format (node_id,x,y for nodes and link_id,start_node_id,end_node_id,...for links)in order to create an oracle spatial network.
I got the dbf for nodes..
I want now to get the attribute table from a loaded shape file containing polylines (roads) and I want to split each polyline to its segments containing their start and end node id's besides their geometry..
Every help accepted..
You might want to clarify your question slightly, but it sounds like you want to get the details of each point in a polyline from a shapefile so that you can define segments.
I wrote an example of how you can do this using Python here:
https://gis.stackexchange.com/questions/40798/how-to-split-shapefile-per-feature-in-python-using-gdal
Specifically, pay attention to the lines:
line = geom.asPolyline()
# all points in the line
for point in line:
You should be able to achieve your goal using a variation of this basic example.
Dan