[postgis-users] Map Simplification Program howto use it or is it exist any better alternative?

Ben Madin lists at remoteinformation.com.au
Sat Feb 13 14:47:07 PST 2010

I had a similar issue with postgis, and I think what you need is a topologically aware GIS, so you could try v.clean in GRASS. This will prevent gaps forming, although if you have them to start you need to look at the rmarea option to get rid of them, or v.digit.

It took me a bit of trial and error to get it correct, but it will do probably do what you are seeking.



On 12/02/2010, at 23:18 , Maciej Sawicki wrote:

> Hi,
> I want to simplify complex shp file. I will probably use something
> like DP algorithm
> (http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm). But
> when using DP algorithm for different points sets, common points can
> be treated differently and this causes empty space between polygons.
> To avoid this I need to use algorithm separately for different
> sections.
> I tried do it my self with help of geotools but I stumbled into this
> project: http://www.cartoweb.org/downloads/vertexsimplification/documentation.html.
> Unfortunately I don't have much experience with relational databases
> and I don't heave any expedience with postgis.
> I tried to simplify this shp:
> http://efele.net/maps/tz/world/tz_world.zip. I installed postgis and
> imported my shp. This is my db:
> Schema |         Name         |   Type   | Owner
> --------+----------------------+----------+--------
> public | geometry_columns     | table    | viroos
> public | spatial_ref_sys      | table    | viroos
> public | tz_world_org         | table    | viroos
> public | tz_world_org_gid_seq | sequence | viroos
> I use this command: python vertex.py -H localhost -u viroos -p
> password -d simplify2 -v public -t public.tz_world -i gid -g geom -m
> 100000
> but I get this error:
> Vertex Table Generation
> Traceback (most recent call last):
>  File "vertex.py", line 393, in <module>
>    main()
>  File "vertex.py", line 380, in main
>    vertex(schemaVertex,tableIn,colGeo,colId,dmin)
>  File "vertex.py", line 46, in vertex
>    populateVertex(vertex,sequence,colId,colGeo,tableIn,dmin)
>  File "vertex.py", line 105, in populateVertex
>    geometryType= s[0][0]
> IndexError: list index out of range
> I got no idea what I do wrong :(.
> I will appreciate any help with this.
> Also if there is exist any better alternative for doing this I would
> like to hear about it.
> TIA for help.
> Best regards,
> Maciej Sawicki
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list