8

I'm going to build a web application, which will render around ten maps using GeoServer. I will be also changing the attribute data in the application for some layers.

What is the recommended choice for performance and deployment: A map rendered from GeoServer using Shapefile or PostGIS database ? ( or they don't really matter)

I don't deal with any spatial query.

  • You have said that you will be: changing the attribute data. Does this mean that your application will do the edits, or that the data will be updated by some other process periodically? – Devdatta Tengshe Apr 11 '13 at 5:38
  • The web application will do the edits. – Sibi Apr 11 '13 at 6:25
14

PostGIS. Geoserver documentation has the following comment:

"Shapefiles are a very common format for geospatial data. But if you are running GeoServer in a production environment, it is better to use a spatial database such as PostGIS. This is essential if doing transactions (WFS-T). Most spatial databases provide shapefile conversion tools. Although there are many options for spatial databases (see the section on Working with Databases), PostGIS is recommended. Oracle, DB2, and ArcSDE are also supported."

This isn't the whole story; even if you don't care about WFS, everything from native-sorting to the ability to create & publish PgSQL views, query performance, data security, storage...just use PostGIS.

  • I don't deal with any spatial query, just so that you may know. – Sibi Apr 10 '13 at 17:40
7

I would like to add for anyone doing this question, which in my experience is recommended for when you plan to change, but even if the spatial data, but if just to show them (WMS) produces better (faster) to use shapefile, see this slide

WMS Performance Tests!Mapserver & Geoserver FOSS4G 2007

  • Interesting presentation thanks! I wonder if the response time (where shp < postgis) has changed over 6 years...? – WolfOdrade Apr 10 '13 at 20:52
  • I did the tests are consistent with what was said in the presentation, but remember what was said in the presentation is to wms, not sure that applies to WFS, I have not proven that I have not needed it would be interesting to try. – phipex Apr 10 '13 at 22:28
  • The way I read it, shapefiles have a better response time but postgis wins on throughput, is that what you see too? – WolfOdrade Apr 11 '13 at 20:11
  • I've only tested with WMS and in the tests I did gave me improved performance shapefile, I have done no testing with WFS – phipex Apr 11 '13 at 21:44
  • @WolfOdrade The thoughput slide (#11) says "Higher lines are better here", meaning shapefiles win. Logical, because (again mentioned on the slide) it is simply an alternative representation of the previous slide on response times. – Stijn Jun 23 '17 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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