I am new to OSM development and I would like to use one of the APIs to FETCH data about streets. I don't really know which api I should use (because there are tons of suggestions) but I think imposm.parser looks good. (I prefer Python or online xml-rpc apis). I can get ways but how can I get the height position of these ways (is this possible? I dont know where and how to use key:ele or key:height from the OSM documentation).
So is it possible to get the height of a way or the height of a specific point (by lat and lon)?
(Using multiple api's is ok)
OSM doesn't contain height data for all objects. The tag height is mostly for buildings and a few other objects. The tag ele is mainly used for mountain peaks.
Streets and most other objects don't have a height information in OSM. You have to use a third-party height source such as SRTM, ASTER or something similar.
Related
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
I have 2 shapefiles. One is the contors of an area and the other the spot heights. Both of them has a altitude attribute. In ArcGIS there is a tool called topo to raster were you can use both these features to create a dem. In qgis I have only found tools were you can only use one.
Any Ideas?
There is only the interpolation tool that I know of which will create a DEM. Depending on the resolution you're after, you could BUFFER the spot heights, then MERGE SHAPE FILES and run the interpolation tool on that.
Using the graphical modeler would prevent the buffer layer being created making the process a little tidier (and i'm sure there's a better way using the python console). Hope this helps.
Has anyone had issues with Tableau Maps displaying backwards? I believe the only workaround for this would be to have my own custom background image and supply the min/max lat/lon.
My data is outlined as the following, and is plotted using the lat/lon in the data.
City | Latitude_DC | Longitude_DC
The not-so-evident and not-the-best solution that pops to mind is the one provided in the comments, simply dragging/moving the map using the mouse and publishing the dashboard without resetting the axis.
In your dashboard you can even create a small floating text-box alerting people to not pin the map if it's something you might be concerned.
I'm not sure about how Tableau's algorithm works to decide that the best map position for your data is putting the United States at right, and I don't think there's a real fix for that (if it's considered a bug to be fixed).
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.
I might be overlooking this, but how can one get the size of a PDF if you're using FastPDFKit?
I'm trying to create PNG's from a pdf, but without knowing the actual dimensions of the page it's rather hard to get it right.
EDIT:
I searching in the documentation before, but all I found was this method:
- (void)getCropbox:(CGRect *)cropbox andRotation:(int *)rotation forPageNumber:(NSInteger)pageNumber withBuffer:(BOOL)withOrWithout
But I have no idea how to use it, it doesn't return anything.
Not sure how familiar you are with PDF, but each page specifies a number of "boxes" that are various rectangles of interest (crop, media, etc)
Most apps using PDF elect to use the crop box which defines the region of the page that should be displayed. (See section 10.10.1 of the PDF 1.7 specification: http://www.adobe.com/devnet/pdf/pdf_reference_archive.html)
Also of note is that a page can specify a rotation angle of 0, 90, 180, or 270 which you need to apply to the crop box yourself. (see /Rotate in table TABLE 3.27 of the PDF 1.7 spec)
So using the above API you would call it like so:
[somePDFDoc getCropbox:&cropbox andRotation:&rotation forPageNumber:10 withBuffer:NO];
This would give you the cropbox rect and it's rotation.
NOTE: I have never used FastPDFKit
NOTE2: If the value of cropbox is CGRectZero, you want to use one of the other rects. Most viewers use the media box instead.