[postgis-devel] corrected patch add precision reduction

strk at refractions.net strk at refractions.net
Mon Jan 3 07:23:57 PST 2005


Carl, I feel that the 'filter' function should be done
entirely inside postgis, with no GEOS involved.
New postgis api contains an LWGEOM_EXPLODED structure
with deserializer (exploder) and serializer which would
make geometrytype-based filtering straightforward, w/out
the need and cost of GEOS<->POSTGIS conversions.

For the clean(geometry) it looks it basically calls
polygonize() for a multipolygon geometry and does
nothing for the others. Why not advertising the 'cleanup'
feature of the polygonize() function and just call that
one instead of adding a new one ?

Finally the reduceprecision() call, and all the
third-args-extensions. I don't think we should add
a scale parameter to any function, or any geometry
editor would apply for that [ eg. difference(g1, g2, computeBbox) ].
The precisionreduction itself could again be implemented
completely inside postgis, as it seems a pretty easy task, not
requiring any noding or indexing.

Comments ?

--strk;

On Mon, Jan 03, 2005 at 12:04:54AM -0500, Carl Anderson wrote:
> correction, as patch was malformed
> 
> patch adding
> 
> clean(Geometry)
> reduceprecision(Geometry, Scale)
> filter(Geometry,  ObjectClass)   where ObjClass == enum 
> {'POINTS','LINES','POLYGONS'}
> 
> I want to add a patch to allow
> 
> difference( g1, g2, scale)
> symdifference(g1, g2, scale)
> intersection(g1, g2, scale)
> isvalid(g1,scale)
> ...
> 
> where each builds an alternate GeometryFactory and then calls the root 
> function.
> 
> but i'm not sure if  each should call an an alternate initGEOS 
> (MAXALIGN, Scale)
> or if a setScale(Scale)  function should override the existing 
> GeometryFactory
> or if a vector of GeometryFactories should be maintained and a declared 
> desired scale
> would cause LWGEOM2POSTGIS to use the correct one.
> 
> C.
> 


> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


-- 

For standing up against patentability of software,

  Thank You, Poland!

Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
Send your thanks:         thankyoupoland.info
Read/do more:		  http://www.noepatents.org/



More information about the postgis-devel mailing list