[postgis-tickets] [PostGIS] #2227: Visvalingam line generalization function

PostGIS trac at osgeo.org
Mon Jan 12 14:24:30 PST 2015


#2227: Visvalingam line generalization function
-------------------------+--------------------------------------------------
 Reporter:  strk         |       Owner:  nicklas      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.2.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by nicklas):

 No, I changed my mind. The comment belongs more here:

 In #2093 it is discussed when and how to collapse a polygon or linestring.
 This is a quite complex discussion and I don't think that I see all facets
 of it.

 One thing that makes it even more complicated in real world applications
 is that you might want different behavior on different geometries in the
 same data set. For example in a data set with polygons describing
 different areal uses. Probably you want to preserve smaller city-polygons
 than swamp-polygons in the middle of a forest.

 At least in theory and at least with Visvalingam's algorithm we could get
 in control over that.

 The question is what effective area we give to the first and last point of
 linestrings, and to the four last points in polygons. As long as we give
 those points the same value they will collapse and disappear at the same
 time. So, what we can do is to tell the function in one way or another:
 1)  Shall the geometries be collapsable ("end points"/"4 last points" in a
 range that we use when we eliminate)
 2)  Shall elimination be on a fixed "Effective Area" (Avoid giving any
 point in the geometry any higher than that fixed value)
 3)  Shall the elimination be size dependent (Set a value like 1.5 times
 the biggest effective area on the "end points"/"4 last points")

 So in 2) and 3) above it is possible to control the behavior with some
 weight value from another field that differs between a city and a swamp.

 I think the implementation can be done without to much overhead, but the
 problem is to communicate the above to the function in a clean way.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2227#comment:8>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list