[postgis-users] Bug in centroid() ?
David TECHER
davidtecher at yahoo.fr
Thu Jul 22 02:28:53 PDT 2004
As we say in French
"C'est vraiment chercher la petite bête :-)"
--- Pierrick Brihaye
<pierrick.brihaye at culture.gouv.fr> a écrit : > Hi,
>
> Given the following data structure :
>
> CREATE TABLE test_table(
> gid serial NOT NULL,
> the_geom public.geometry
> ) WITH OIDS;
> INSERT INTO test_table (the_geom)
> VALUES (GeometryFromText('POINT(149149
> -2344411)',-1));
>
> The following statement :
>
> SELECT postgis_version(), envelope(the_geom),
> centroid(the_geom),
> centroid(envelope(the_geom)) FROM test_table;
>
> Returns (reformated as rows) :
>
> "0.8 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"
> "SRID=-1;POLYGON((149149 -2344411,149149
> -2344411,149149 -2344411,149149
> -2344411,149149 -2344411))"
> "SRID=-1;POINT(149149 -2344411)"
> "SRID=-1;POINT(-1.#IND -1.#IND)"
>
> First of all, could postgis_version() be more
> verbose and, for example,
> display the GEOS and the PROJ version ? It would
> help in debugging,
> wouldn't it ?
>
> Second, my PostGIS version is old and maybe my
> problem is already fixed.
> Is so, please forgive me. I didn't see anything
> about this topic in the
> PostGIS and GEOS CVS logs though...
>
> As you can see, the centroid(envelope(the_geom))
> can't return a valid
> result. OK, I admit that this indirection is quite
> odd, but is should
> return that same result as centroid(the_geom),
> shouldn't it ?
>
> Whose fault is it ? GEOS's or PostGIS's ?
>
> Cheers,
>
> --
> Pierrick Brihaye, informaticien
> Service régional de l'Inventaire
> DRAC Bretagne
> mailto:pierrick.brihaye at culture.gouv.fr
> +33 (0)2 99 29 67 78
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
>
http://postgis.refractions.net/mailman/listinfo/postgis-users
>
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Yahoo! Messenger: dialoguez instantanément avec vos amis. Téléchargez GRATUITEMENT sur http://fr.messenger.yahoo.com
More information about the postgis-users
mailing list