Before I start, this is going to be a general question but with specific cases. I've been trying to understand GIS tools and applications to achieve the following:
- Build my own basemap
- Publish the basemap online
- Add my own data layers to the online basemap
- Perform analysis (on-the-fly)
- Add interactivity to the map
So, In my first attempt, I built a spatially enabled database on PostGIS, queried this using PHP, overlayed it on google maps using their API and added interactivity using their api itself. I carried out analysis like area, denisty etc. on the fly using postGIS functions.
For my next attempt, I downloaded TileMill and rendered some really beautiful maps and added zoom level functions to it. I also exported my MBtile files. When I came across trying to publish this online, I hit quite a few names, but got lost and confused:
- TileStache
- TileCache
- TileStream
- Mapserver
- Mapnik
- GeoServer
- Mapbox
So, I understand these are mapservers. But what exactly does a mapserver do? Why is it used? Why can't i server my tiles from a normal web Apache server? And for MBtiles, how many servers are out there which lets you publish it directly?
I can also export my basemap as a png/vsvg format. Can these formats be used to make a basemap through a mapserver?
When researching interactivity I came across:
- Leaflet
- ModestMaps
- OpenLayers
- Mapstraction
I understand these are Javascript Mapping API's. But on what base map can I use these? Can it be used on Google maps? Can I use them on my own base maps too?
I basically want to understand the differences between these tools and which would be the best software stack to build a fully customized, interactive map with my own basemap.
Sorry if my question sounds to general. I will definitely be here to clarify my questions
Answer
As you go deeper and deeper into the world of GIS, you'll realize that a lot of work has been already been done to solve common problems.
You have your geographic data in your database. How do you arrange the various layers and render them, and add various map elements to produce a Map that you can print? You need a desktop GIS apllication. You could use one of the FOSS like QGIS, Grass, uDIG ect or a commercial option like ArcGIS desktop etc.
You have geographic data in your database and want to use that to create to a map in your website dynamical. Use a mapserver to read the geo-data and create an image (rendered according to your requirements) for you on the fly that you can show to your users. There are many options for you like Geoserver, Mapserver, ArcGIS Server.
Now you want an interactive slippy map on your website, and using a mapserver to come up with those images in real time is just slow. that's when you use a tiling software to precompute the tiles and serve them. This tiling software can be a mapserver in itself, or something that works with your mapserver, or could be built in the mapserver itself. When you read about TileMill, or TileStream or cached Map services from ArcGIS server, they are used for this purpose
When you were creating the slippy map, how do you handle the various useractions, and calls to the server? Things like zooming in on double click, or calling for new tiles on panning the map, to showing the coordinates on mouseover, as well as stacking images/map/services from different servers/service? You use a client side mapping library like OpenLayers, Leaflet, ArcGIS server's Javascript API and so on.
So to conclude, these different softwares are there to fulfill different needs and solve different problems. You usually need more than one software and usually work with a stack of them, to make something easy and simple looking slippy map on a webpage.
No comments:
Post a Comment