1

I have got Asset tracking installations for many clients. The availability of GIS map data for every client location seems to be the tough part. I have got a MapServer WMS installation.

Can I use OSM data behind mapserver? Also I need to timely update with latest OSM data.
Is there any mapfile (MapServer map style configuration file) for OSM data?
And is PostgreSQL/PostGIS also a better option to include?

Update: I followed exactly the instructions on http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu as advised by mapper. Everything worked fine. Got the osm-gooogle.map. But, when I browsed http://localhost/cgi-bin/mapserv?map=/var/www/osm-demo/mapserver-utils-svn/osm-google.map&mode=browse&template=openlayers&layers=all
There was few things to change in the generated mapfile. Mainly, the IMAGEPATH & IMAGEURL were inside METADATA tag. Moved them outside to WEB tag and everything worked fine. It started drawing Google styled map from OSM data stored in local PostGres DB.

7
  • 1
    Did you already tried trac.osgeo.org/mapserver/wiki/RenderingOsmData or would shapefiles be an option to you? If I understand you right, you want to switch to OSM without the need to setup a new infrastructure, right?
    – Mapper
    Jan 20, 2014 at 8:35
  • Yes, I saw that. That one says outdated and to follow trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu
    – mapsir
    Jan 20, 2014 at 9:52
  • And why doesn't worked it for you or do you have different requirements?
    – Mapper
    Jan 20, 2014 at 12:36
  • I am working the latter one. Not much familiar with Linux. Hope will succeed.
    – mapsir
    Jan 21, 2014 at 3:59
  • 1
    @Mapper I followed trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu There was few things to change in the generated mapfile. Mainly, the IMAGEPATH & IMAGEURL were inside METADATA tag. Moved them outside to WEB tag and everything worked fine. It started drawing Google styled map from OSM data stored in local PostGres DB. Thank you Mapper
    – mapsir
    Jan 21, 2014 at 8:51

1 Answer 1

1

I can't quite tell what our question is, but here is an attempt to answer it. I am assuming you want a web-map with points overlaid on top.

You can load OSM tiles from a variety of sources. For example, say you use Leaflet you could load a map with an OSM baselayer using the following approach: http://switch2osm.org/using-tiles/getting-started-with-leaflet/

If you wanted to show the vehicle locations as points on a map, you could pull this data from Postgres/PostGIS. You would need a server side script to output this data. A simple approach would be to use a php script that outputs json. Then, you could style these points on the client side in Leaflet.

If you wanted more sophisticated styling, you could use Mapserver to style the data (but I would need to know more about what you are trying to achieve).

2
  • By simply adding OSM tiles, can we geocode/reverse geocode my tracking/playback locations?
    – mapsir
    Jan 21, 2014 at 4:01
  • No, tiles are just images. They don't contain any meta-data. For geocoding/reverse-geocoding you need address data. Take a look at Nominatim.
    – scai
    Jan 21, 2014 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.