openstreetmap

Determining path user is on based on GPS location

一个人想着一个人 提交于 2019-12-04 19:22:19
I'm writing an app that takes advantage of GPS information to determine what road/trail (or "way" in OpenStreetMaps terms) a user is on. Ways in OSM do not include width information, just a series of points connected together, so it isn't a matter of figuring out which poly box a GPS coordinate is in. The information I have is the list of points that define the trail as it bends (if it was just a straight trail, could be 2 points 1/2 mile apart). These trails are usually separated by tree-lines (say 50-300m apart) and there can be lots of them within a park so accuracy without width

R: How to identify a road type using GPS?

北战南征 提交于 2019-12-04 15:36:47
I have a GPS coordinates of several points and I want to know if they are on a highway, or trunk road, or minor road, and it would be even greater if I could identify a road name. I'm using R leaflet to draw maps and I can see with OpenStreetMap that different types of roads are colored differently, and I wonder how I can extract this information. It's not a problem to use Google maps instead if it will solve my problem. I would appreciate any help. You can use revgeocode() from ggmap : library(ggmap) gc <- c(-73.596706, 45.485501) revgeocode(gc) Which gives: #[1] "4333 Rue Sherbrooke O,

react-map-gl without API key using osm tiles

北战南征 提交于 2019-12-04 15:29:17
Is it possible? This tells me it is, but dont know why it defines and API key. but I cannot get it to work with react-map-gl StaticMap class. The property I can see from that class is just mapStyle which would take a standard Mapbox vector tiles path/name. Does it take an object? My code does not give me an error or show the tiles I request. <DeckGL> <StaticMap mapStyle= {{ "version": 7, "sources": { "simple-tiles": { "type": "raster", "tiles":["http://a.tile.openstreetmap.org/{z}/{x}/{y}.png", "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png"], "tileSize": 256 }, "power": { "type": "vector",

OSM: convert ties from projected coordinates in spherical mercator “EPSG:900913” to “EPSG:4326” coordinates

本秂侑毒 提交于 2019-12-04 15:05:05
I'm using a map with a layer (from the example): var lonLat = new OpenLayers.LonLat(40.4088576, -86.8576718) .transform( new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984 map.getProjectionObject() // to Spherical Mercator Projection ); on moveend i'm get center coordinates: map.getCenter(); map.getZoom(); and zoom level: 4925535.4503328, -9668990.0134335, 12 Using algorithm from documentation public PointF TileToWorldPos(double tile_x, double tile_y, int zoom) { PointF p = new Point(); double n = Math.PI - ((2.0 * Math.PI * tile_y) / Math.Pow(2.0, zoom)); p.X = (float)((tile_x

how to setup own geocoding server

被刻印的时光 ゝ 提交于 2019-12-04 14:01:31
问题 Is there a possibility to install a server for geocoding based on open streetmap data ? Unfortunately calling a web service is no option, we need an own server. I saw that Map Server does not provide geocoding. 回答1: Here's how to build your own OpenStreetMap Server. 回答2: How about Nominatim ? 来源: https://stackoverflow.com/questions/4459274/how-to-setup-own-geocoding-server

How to create a store map using LeafLet

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 13:29:15
问题 Im looking to create a map that can be interactive. The best option that I found is leaflet, the thing is I don't find any resource explaining how to create my own map. Im looking to create a mall map where user can see all the stores, fountain ... How could I achieve that ? 回答1: The best place to start would be the Leaflet examples page: http://leafletjs.com/examples.html Here is the quick start guide: http://leafletjs.com/examples/quick-start.html Update To create an indoor map, you can use

Change Projection in OpenLayers Map

我们两清 提交于 2019-12-04 12:36:09
I want to set "EPSG:4326" as the projection of an OpenLayers map, but when I try it, I always get "EPSG:900913". function init() { var options = { projection: new OpenLayers.Projection("EPSG:4326") // ignored }; map = new OpenLayers.Map('map', options); var layer = new OpenLayers.Layer.OSM.Osmarender("Osmarender"); map.addLayer(layer); ... alert(map.getProjection()); // returns "EPSG:900913" ... } The base map is open street map. How can I set the Projection to EPSG:4326? It is Osmarender that has a hardcoded 900913 projection, nothing to do about that. But have you considered taking things

how to Convert Lat ,long to an XY coordinate system (e.g. UTM) and then map this to pixel space of my Image

点点圈 提交于 2019-12-04 08:37:33
问题 I have a very small area map , which I downloaded from Openstreet map(PNG) and also its OSM(.osm) file which contains its Lat ,long. Now I want to convert Lat ,long to an XY coordinate system (e.g. UTM) and then map this to pixel space of my Image which is of size (600 x 800 ). I know its a two way process ,like to know how to do this . Thank you 回答1: GPS Coordinates to Pixels Assuming this map does not cross prime meridian Assuming pixel 0,0 is upper left, and pixel 600,800 is lower right.

Is there an API for openstreetmap? [closed]

此生再无相见时 提交于 2019-12-04 07:35:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I wonder if there is any API I could query OSM data through, for example; Are (lon_1, lat_1) at land or at sea? Or could it be possible to get an island as a well-defined polygon? The only usage I've seen so far has just been tools for rendering OSM data (generating tiles). 回答1: Yes, there is an api and xapi

How to download the OSM tiles for selected part of map

故事扮演 提交于 2019-12-04 06:59:59
问题 I want to download the map offline for a selected part of the map with single Zoom level with Openlayer OSM layer. I have got the four corner of map i.e display section of a map. But need to get the all tiles image or tiles between that four corners. I have reviewed some example: Openlayers get the image url of the tile under the mouse https://gis.stackexchange.com/questions/167792/how-to-retrieve-the-tile-url-in-openlayers-3 But I need to download the tiles on customer button click. Can