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 am dealing with some large datasets and would like to minimise the amount of data sent over the network. I am using OpenLayers' BBox strategy to only transfer the data that is needed but I am wondering whether I can simplify the output so that I can show lower zoom levels without having to transfer data with unnecessary accuracy/detail.

I am using GeoServer as a WFS server as part of the OpenGeo bundle.

share|improve this question
add comment

4 Answers

up vote 4 down vote accepted

WFS/GeoServer does not really provide any way to do generalization on the fly based on scale, but there is a special extension that does what you are looking for by doing some pregeneralization.

http://docs.geoserver.org/stable/en/user/data/featurepregen.html

share|improve this answer
1  
+1 - very nice extension. Would be nice to have a MapServer equivalent.. –  geographika May 3 '11 at 16:09
add comment

Some possible solutions:

  • Do you really need the data in a vector format? If the large complex polygons are just for reference then they'll be fine as WMS / images. If you can simplify them then you probably don't need the geometry anyway.
  • You can pass in a generalisation parameter to a map layer through a custom paramter, and use this to simplify geometry. This thread is about MapServer, but I assume something similar can be done with GeoServer - http://osgeo-org.1803224.n2.nabble.com/WFS-Server-Control-output-by-scale-td2279383.html
  • Also referenced in the above thread, you can store the datasets presimplified for different scales and hide/show them in your map as needed
  • Make sure you have gZip compression turned on at your webserver as this will shrink GML/XML files to at least half the size
share|improve this answer
    
I definitely need them in vector format as I want to be able to click on them to get further information as well as edit the polygons (though obviously I only want to be able to edit the true shapes, not the simplified versions, which might be a little tricky). –  Mr_Chimp May 3 '11 at 16:27
    
@mr_chimp - you can use the WMS GetFeatureInfo request to return just the geometry and attributes for the feature under a mouse click. –  geographika May 3 '11 at 17:26
add comment

Using the OL cluster strategy, you can simplify the representation (for users) but the amount of data transfered will not be lower, because the clusterization is done on the client side.

See also, the documentation page.

(I don't know about available options on the server side)

share|improve this answer
    
Maybe I'm mistaken but the cluster strategy appears to be for point data. I have complex polygon data which I would like simplify. –  Mr_Chimp May 3 '11 at 11:53
    
This wouldn't reduce network traffic as all the points would be needed to cluster client side. –  geographika May 3 '11 at 16:08
    
@geographika > that's what I wanted to say, but as you can guess I forgot the negation in my sentence (repared now)! It is still a good way to enhanced readability for final users –  simo May 3 '11 at 21:19
    
@Mr_Chimp > no equivalent for polygons, indeed –  simo May 3 '11 at 21:22
add comment

I am afraid I have not totally understood your question, so maybe this answer is not useful.

If your concern is that the WFS is 'heavy' (its GML output is verbose by nature), my advice is that instead you use Well-Known Text (WKT), if possible. I guess that OpenLayers' BBox strategy is "compatible" with WKT.

share|improve this answer
add comment

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.