[postgis-devel] [PostGIS] #724: ST_AsEWKT , ST_GeogFromText regress failure
PostGIS
trac at osgeo.org
Mon Dec 20 12:08:42 PST 2010
#724: ST_AsEWKT , ST_GeogFromText regress failure
---------------------+------------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
This one is from regression testing against PostGIS 1.5.2:
I'm not really sure if this is just something you are not done with
In PostGIS 2.0
{{{
SELECT
ST_AsEWKT(ST_Collect(ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((-71.0821
42.3036 2,-71.0822 42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821
42.3036 2)))'),
ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1261 42.2703 1,-71.1257 42.2703
1,-71.1257 42.2701 2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703
1))') )) ;
}}}
-- yields the below which is the same answer as 1.5 --
{{{
SRID=4326;GEOMETRYCOLLECTIONM(MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822
42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036
2))),POLYGON((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701
2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1)))
}}}
Didn't we plan those to be all Ms in there?
-- this works
{{{
SELECT
geography(ST_Collect(ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((-71.0821
42.3036 2,-71.0822 42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821
42.3036 2)))'),
ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1261 42.2703 1,-71.1257 42.2703
1,-71.1257 42.2701 2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703
1))') )) ;
}}}
--This doesn't work but used to in 1.5 so I have this problem
-- that I can't convert what I used to input.. Maybe we don't care.
{{{
SELECT
ST_GeogFromText(ST_AsEWKT(ST_Collect(ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((-71.0821
42.3036 2,-71.0822 42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821
42.3036 2)))'),
ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1261 42.2703 1,-71.1257 42.2703
1,-71.1257 42.2701 2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703
1))') ))) ;
}}}
-- this
{{{
SELECT
ST_AsText(geography(ST_Collect(ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((-71.0821
42.3036 2,-71.0822 42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821
42.3036 2)))'),
ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1261 42.2703 1,-71.1257 42.2703
1,-71.1257 42.2701 2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703
1))') )) );
}}}
-- gives the below which was kind of what I was expecting ST_AsEWKT to
return except with the additional SRID info
{{{
GEOMETRYCOLLECTION M (MULTIPOLYGON M (((-71.0821 42.3036 2,-71.0822
42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036
2))),POLYGON M ((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701
2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1)))
}}}
I'm not sure if we consider this a bug or not -- or is this the same
issues as #718 and its just because you haven't set ST_AsEWKT to behave
like the new ST_AsText of geography?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/724>
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-devel
mailing list