I was trying "How I set up GeoServer on an old machine" and By @iant I was setting up Tomcat and all.

I suddenly had a question ... why do we need MapServer and GeoServer?

Can these servers pull data from the database layer as the user asks and only presenting what user has asked from the database?

3 Answers 3


The simple answer is that you don't need them, but it makes life much easier. You have to have some sort of server element between your database and the web browser: so you can either write your own server in PhP (or java or whatever) and handle all the vagaries of the database you are using and sort out the wire transfer formats etc and do the debugging and testing. Or you can stand on the 131 person-years that have gone in to GeoServer's development ( or the 53 person years of MapServer) and start serving maps this afternoon.

And all that is before I start my standard rant about standards and why letting anyone who can implement the standard consume your maps in their client with out any extra coding on your or their part is a good thing.

  • 1
    Geoserver is easy to install and implement - why re-invent the wheel when some product is freely available. One word would be 'control' on data, projection and distribution via web browser
    – Mapperz
    Commented Oct 12, 2011 at 13:51
  • How would you style your data otherwise? (I got about 30+ questions like this that I can give you ) Commented Oct 13, 2011 at 16:56

It really depends what you need to do with the data.

For example if you only need to display vector points on top of a base map then you can create a very simple server-side script (in Python, .NET, PHP) to publish spatial data from your database. The ability of PostGIS to serve GeoJSON makes this trivial.

Serving single features as KML and creating bounding boxes may also be more easily handled directly with a simple script and a database. Premade tilecaches also allow (possibly) simpler server side software such as TileStache.

MapServer or GeoServer in these cases would be a huge overhead for little benefit. And there is a huge overhead in configuring and maintaining either of these applications and their associated dependencies - especially if you need to deploy on a shared server or have restricted access.

As Ian mentions there are lots of benefits of using map server software. Probably the main benefit is the cartographic options for displaying data dynamically. OGC standards, projections, attribute queries, legends, metadata, caching, security, different spatial formats, different image formats, printing etc. are also then available.

  • are you saying you can write a simple server that talks to postgis (in a secure, bug free manner) faster than I can unpack GeoServer point it at Postgis? Remember GeoServer can serve GeoJSON too.
    – Ian Turton
    Commented Oct 12, 2011 at 16:08
  • 4
    Assuming you have ASP.NET or a Python web server set up then its ~10 lines of code to serve a feature by ID (for example) Commented Oct 12, 2011 at 16:20

Using a framework like Geomajas, you could also directly pull the features from database and send the features to the browser using SVG/VML for rendering/editing in the browser. There is also a rasterizing plugin which allows rasterizing on the server.

  • Your URL points to something else entirely. Maybe the URL is dead?
    – OverArch
    Commented Dec 11, 2023 at 4:30

Your Answer

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

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