10

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.

2
  • 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? Commented Apr 11, 2013 at 5:38
  • The web application will do the edits.
    – Sibi
    Commented Apr 11, 2013 at 6:25

2 Answers 2

15

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.

1
  • I don't deal with any spatial query, just so that you may know.
    – Sibi
    Commented Apr 10, 2013 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

5
  • Interesting presentation thanks! I wonder if the response time (where shp < postgis) has changed over 6 years...?
    – WolfOdrade
    Commented Apr 10, 2013 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
    Commented Apr 10, 2013 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
    Commented Apr 11, 2013 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
    Commented Apr 11, 2013 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
    Commented Jun 23, 2017 at 13:19

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.