4

I'm currently running a GeoServer service and my task is to make the vectors rougher than they are right now. I really don't know where and how GeoServer processes the data from the database and how it will be displayed.

I want to do this to speed up the render time for loading the map. If the server uses 20 points right now, I want it to use 10 for example.

I don't know where to start. If my information provided is not enough, just tell me and I'll tell everything you want to know.

2

Using the GeoTools feature-pregeneralized module:

http://docs.geoserver.org/stable/en/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html

  • Hi thanks for the quick answer. As I understand it the tutorial is working with shapefiles. i have my datastore configured from a postgis database where the information is stored. sorry if my question is not asked proper, but im new to geoserver and stuff im currently learning. – shitake83 Dec 6 '10 at 16:06
  • 1
    Instead of a file url you need to use a jdbc url. E.g. jdbc:postgresql:database or jdbc:postgresql://host:port/database – Sean Dec 6 '10 at 16:27
  • 1
    It is a GeoServer module (not GeoTools) – Ian Turton Dec 6 '10 at 16:32
  • as above iant & Sean – Mapperz Dec 6 '10 at 17:19
2

GeoServer won't simplify the data for you. You'll have to do that outside of GeoServer. Create the levels of generalization that you want then follow the instructions in Mapperz's link.

How to simplify them depends on the tools you have available. In PostGIS, use the method Paul Ramsey describes in another question. In ArGIS Desktop there is a Simplify Polygon tool (use the Resolve Errors option).

  • i dont really understand the way hes trying to do it. can you help me ? – shitake83 Dec 6 '10 at 16:57
  • it takes a congested polygon (lots of vertices) and converts it to lines where it is generalised (vertices removed) then rebuilds the simplified lines back to a polygon - the point is use to carry the attributes between the original poly to the newer simplified polygon. – Mapperz Dec 6 '10 at 21:20
  • He dumps the polygons as rings (ST_DumpRings) which gives exterior and interior rings. Then he unions those rings so that the simplify on works on one copy of the boundary between to polys. Then, he simplifies the rings and recreates the polygons. This creates a collection of polygons that are dumped into a table as individual polygons. However, this whole process has stripped away the attribute data. So, the new polygons are joined to a point on the surface of the old polygons to get the attribute data onto the new polygons. If you have access to ArcGIS or QGIS it might be easier. – Sean Dec 6 '10 at 21:35
1

creates a layer in geoserver using SQL View. In SQL query, use postgis function to simplify the geometry. I do not know if it will improve the total time, but time to create tile is sure to be improved.

Your Answer

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