[postgis-users] Bugs in Postgis/GEOS

strk strk at keybit.net
Mon Jan 12 05:04:06 PST 2004


There was a bug in the postgis<->geos converter.
Try the CVS version, should solve your problem.

--strk;

schabios wrote:
> Hi,
> 
> For our company project, we want to use PostGIS, but it seems that the current 0.8.0 still has some bugs that produce weird results or even lead to a PostGreSQL Server crash.
> 
> We're currently trying to isolate some simplified testcases that cause the crashes, but were not successful yet (and, as you may understand, I am not in the position to release our real world application data :-)
> 
> But for one case of weird data, I have an easy and reproducable example:
> 
> gistest=# select geom from test;
>               geom
> ---------------------------------
>  SRID=-1;LINESTRING(1 1,3 3,4 4)
>  SRID=-1;LINESTRING(1 1,2 3,4 4)
>  SRID=-1;LINESTRING(1 1,2 2,4 4)
>  SRID=-1;LINESTRING(1 1,2 4,4 4)
> (4 Zeilen)
>  
> gistest=# select geomunion(geom) from test;
>                                      geomunion                                                                                 
> ------------------------------------------------------------------------------------
>  SRID=-1;MULTILINESTRING((1 1,2 4,4 4),(1 1,2 2),(2 2,3 3),(3 3,4 4),(1 1,2 3,0 0))
> (1 Zeile)
>  
> gistest=# select geomunion(geom) from test;
>                                          geomunion                                                                                 
> -------------------------------------------------------------------------------------------
>  SRID=-1;MULTILINESTRING((1 1,2 4,4 4),(1 1,2 2),(2 2,3 3),(3 3,4 4),(1 1,2 3,1.7e-308 2))
> (1 Zeile)
>  
> gistest=# select geomunion(geom) from test;
>                                          geomunion                                                                                 
> -------------------------------------------------------------------------------------------
>  SRID=-1;MULTILINESTRING((1 1,2 4,4 4),(1 1,2 2),(2 2,3 3),(3 3,4 4),(1 1,2 3,1.7e-308 2))
> (1 Zeile)
>  
> gistest=# select numgeometries(geom) from test;
>  numgeometries
> ---------------
> 
> Please notice that the first query produces a differen tresult compared to the following (identical) queries.
> 
> My Human brain thinks that the result should be something like
> 
>  SRID=-1;MULTILINESTRING((1 1,4 4),(1 1,2 3,4 4),(1 1,2 4,4 4))
> 
> or (including some optimizations)
> 
>  SRID=-1;MULTILINESTRING((1 1,4 4,2 3,1 1,2 4,4 4))
> 
> I don't see any reason for the algorithm to find coords like (0 0) or (1.7e-308 2) which are neither part of the original input data nor any intersection points thereof.
> 
> Can you reproduce this behaviour and confirm it as a bug?
> 
> What can I (with very limited C++ knowledge) do to help with fixing it?
> 
> Should I better switch to the devel list for such questions?
> 
> Thanks a lot for your patience,
> Markus Schaber
> 
> PS: I'm currently developing some improvements for the PostGIS Java interface - are you interested in patches? If yes, is the devel list the correct place to discuss them?
> 
> 
> -- 
> markus schaber | dipl. informatiker
> logi-track ag | rennweg 14-16 | ch 8001 zürich
> phone +41-43-888 62 52 | fax +41-43-888 62 53
> mailto:schabios at logi-track.com | www.logi-track.com
> 
> _______________________________________________
> 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