I am new in OSM but now I need create application which will use GIS (Geoserver) and will be provide service to get road from point A to point B.
I found some informations about this but I still have any questions.
My is download open street maps and extract to database (PostgreSQL), and for routing use plugin pgRouting. Next connect db to map server and provide api for clients.
Questions:
1. Is that correct way?
2. How osm format could I use for postgre? (osm.pbf? shp.zip?, or something else?)
Thanks for answers
Let me elaborate, what things needed to start till end:
First you need to download, OSM data, for which you can simply use Overpass API.
OSM2PO JAVA based CLI tool to convert OSM data into routable data, here is the good guidline how to use this tool.
Postgresql with postgis and pgRouting extensions, you will use dijkstra algorithm to get shortest route, or any other algorithm that best suits you.
Finally you will need Geoserver, that will provide OGC standards e.g. WMS and WFS, through which you can get your route in raster or vector format, you can store your table as layers and you may need a SQL View.
Further, for front end you can use OpenLayers, which is a JavaScript Web Mapping Library or you can use Leaflet,
You can easily do WMS and WFS requests from these libraries to Geoserver and Geoserver will send you a response, with your requested data, if request is correct.
NOTE: You can use QGIS v2 with pgRouting plugin for testing.
Related
I am writing mobile application with apache cordova engine.
I need tile and geocoder(reverse geocoder) server, for this reason I want to use here-api.
I need something as OSM, with buildings, street names... etc.
How I need request to get this type of tiles?
Or, Is it possible to get OSM tiles by here's servers?
Basically I need tiles of Armenian.
Thanks and Regards.
You cannot get OSM tiles via HERE servers. I believe you are looking for this:
https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html
And then this:
https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html
You'll have to sign up for a plan before you can use it though:
https://developer.here.com/plans/api/consumer-mapping
I need to create a local reverse geocode service for my specific country using open source maps.
My first option is OpenStreetMap so I downloaded my country PBF file.
Can anyone give any idea on how to start using this data? or other options?
There are already various search engines for OSM available. The most popular one currently is Nominatim. It supports both geocoding and reverse geocoding.
Well, you could start of by reading the wiki, I guess it would be interesting to find out which node / way / relation tags you would use as an input. Apart from that you should have an understanding of the best data structures for the task, I guess you want to perform nearest neighbor queries, so you might need to implement / use an R-Tree for that...
I am trying to create my own map with the help of osm data and geoserver,successfully partially completed it with my own SLD..Now I need a web editor for edit that map data .I select "iD" for it. i don't know how to configure it with my planet osm data base
You need to keep in mind, that your current setup is designed to work for rendering only (so an OSM like basemap).
So what you IMHO need:
OSM API services
This is called rails port and is a bit tricky, as it's pretty unusal to clone the whole OSM infrastructure for "usual devs". Please be aware that you also need to think about how you want to deal with your and the official data, as you create some 'fork' of the planet and create a parallel world dataset (update workflow, sharealike license, ...)
Own iD instance
You should also host your own iD instance (or adapt the JOSM settings for each user) so you can contribute via your own API services from step 1.
Can anybody say, how can I draw custom MAP vector map (dynamic) with using mongodb's Geo-spatial data?
Or I look for Map maker with using mongoDB.
Thanks.
MongoDB's default data storage is now GeoJSON, see the GeoJSON docs. This format, being an extension of JSON, naturally plays very well with Javascript. There are direct GeoJSON loaders in Google Maps, OpenLayers and in Leaflet, three of the better known Javascript mapping libraries out there. Both OpenLayers and Leaflet are open source, so you can view the source to see how it works and extend as you wish.
You will have to write something to transmit the GeoJSON from MongoDB to the client and you might have to deal with cross domain issues, depending on your setup, see JSON: How do I make cross-domain JSON call for possible solutions.
Does OpenStreetMap just provide GIS data? To render maps and have a browser based UI to show maps with data, would a developer need to use something like Mapnik?
OpenStreetMap provides data yes, and you'll need specific tools to make map with them. You first need to put the data in a true GIS format, which OSM is not. Think about PostGIS, an osm2pgsql tool is designed for that. Then, you'll need a rendering tool, i.e. a cartographic engine. You can use Mapnik or MapServer. Tilemill or Kosmtik can help you designing your map styles.
Take a look here.
yo can export data form OpenStreetMap and render your own map.
Take a look at
http://www.slideshare.net/jones139/rendering-openstreetmap-data-using-mapnik
http://www.slideshare.net/artemp/mapnik-sotm-2007
There's a fuller list of rendering libraries for OpenStreetMap data here, both free and commercial.
http://wiki.openstreetmap.org/wiki/Renderer
Disclosure: I am the developer of one of them.
OpenStreetMap provides map data out to a wide sprawling ecosystem of different downloads and tools offering developers different map-making and map using possibilities. Here is a diagram I drew which captures some of this:
So the data comes out of the core of OpenStreetMap, in the form of 'planet downloads', one big unwieldy blob of XML (and diffs), but from there it fans out into a range of other offerings to developers, many of which are provided by 3rd parties. Taken together "OpenStreetMap & Friends" provide lots of possibilities.
If you are inclined to run your own rendering system, then yes, Mapnik is a good choice. Powerful and scaleable (most successful OSM tile servers run Mapnik), but takes a bit of setting up. You normally load OSM XML data into PostGIS, and run mapnik from that (tutorials on switch2osm.org)
If you are not inclined to run your own rendering system (for more lightweight web development tasks this seams reasonable!) you don't have to! You can configure LeafletJS or OpenLayers or others to fetch map tiles from a tile server run by somebody else. There are many providers. See the providers list on switch2osm.org and the Tile Servers list.