[postgis-users] Curved Geometry not supported by postgis functions

Ken Southerland southerland at samsix.com
Wed Oct 17 06:02:28 PDT 2007


Mark Leslie wrote:
> Ken Southerland wrote:
>  > We started using the new curved geometries in postgis and found that
>  > some of the functions don't support them.  I am using postgres 8.2 with
>  > postgis 1.3.1-1.
>  >
>  > For instance, the intersects( geometry, geometry ) function gives the
>  > following error ...
>  >
>  > Caused by: org.postgresql.util.PSQLException: ERROR: Exception in
>  > LWGEOM2GEOS: curved geometry not supported.
>  >
>  > ... and the length( geometry ) function returns zero for any geometry
>  > containing a curve.
>  >
>  > Is this problem stemming from postgis or geos do you think?  We have
>  > made a big, out-on-a-limb leap in deciding to use these new curved
>  > geometries and converting customer data over to them and now we are
>  > running into these issues when running reports.  Help.  Por favor.
>  >
> 
> The problem stems from the fact that curved geometry support is in
> ongoing development.  Much of the functionality of postgis is achieved
> by leveraging geos, which does not support curved geometries, and last I
> heard, didn't have them on the radar.  While postgis can perform basic
> operations on the curves, anything that backs onto geos, which are most
> of the relationship and processing functions, don't support them.  The
> length(geometry) should work, so that sounds like a postgis bug.
> 
> There was work in progress, that I believe has stalled, to hack together
> some semblance of support by converting a curved section of geometry to
> a linear approximation, pass that to geos, and then attempt to
> regenerate curved sections from any result returned.  That is clearly
> not very good solution, but is the only one I'm aware of at the moment.
> 

Yeah, that's precisely what we are thinking of as a hack on our end too.
For speed issues we are thinking of storing both curved and "straight" 
versions of the same geometry and using the straight version in these 
function calls.  Yuck.  I guess we have to run with our temporary fix 
for now.  Bummer.



-- 
------s----a----m----s----i----x------
--

Ken Southerland
Senior Consultant
Sam Six, Inc.

503-236-4288
http://www.samsix.com



More information about the postgis-users mailing list