Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 we need Mapsever and Geoserver? Can these server pull data from database forming layer as user asks and only presenting what user has asked for from database?

share|improve this question

3 Answers 3

up vote 16 down vote accepted

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.

share|improve this answer
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 Oct 12 '11 at 13:51
    
How would you style your data otherwise? (I got about 30+ questions like this that I can give you ) –  Ragi Yaser Burhum Oct 13 '11 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.

share|improve this answer
    
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. –  iant Oct 12 '11 at 16:08
2  
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) –  geographika Oct 12 '11 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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