[postgis-tickets] [PostGIS] #2433: ST_ConcaveHull 2.1 regres failure compared to 2.0.3
PostGIS
trac at osgeo.org
Fri Oct 18 14:44:08 PDT 2013
#2433: ST_ConcaveHull 2.1 regres failure compared to 2.0.3
---------------------+------------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.1.1
Component: postgis | Version: 2.0.x
Keywords: |
---------------------+------------------------------------------------------
Description changed by pramsey:
Old description:
> This worked in 2.0.3
>
> {{{
> SELECT ST_ConcaveHull('SRID=4326;MULTIPOINTM(-71.0821 42.3036 1,-71.0821
> 67.3036 1,-56.0821 42.3036 1,-56.0821 67.3036 1,-41.0821 42.3036
> 1,-41.0821 67.3036 1,-26.0821 42.3036 1,-26.0821 67.3036 1,-11.0821
> 42.3036 1,-11.0821 67.3036 1,3.9179 42.3036 1,3.9179 67.3036 1,18.9179
> 42.3036 1,18.9179 67.3036 1,33.9179 42.3036 1,33.9179 67.3036 1,48.9179
> 42.3036 1,48.9179 67.3036 1,-71.0821 42.3036 2,-71.0821 67.3036
> 2,-56.0821 42.3036 2,-56.0821 67.3036 2,-41.0821 42.3036 2,-41.0821
> 67.3036 2,-26.0821 42.3036 2,-26.0821 67.3036 2,-11.0821 42.3036
> 2,-11.0821 67.3036 2,3.9179 42.3036 2,3.9179 67.3036 2,18.9179 42.3036
> 2,18.9179 67.3036 2,33.9179 42.3036 2,33.9179 67.3036 2,48.9179 42.3036
> 2,48.9179 67.3036 2)'::geometry
> , 0.5,false)
> }}}
>
> and gave answer:
>
> {{{ -- The ST_AsEWKT output
> -- PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit
> POSTGIS="2.0.3 r11132" GEOS="3.5.0dev-CAPI-1.9.0 r0" PROJ="Rel. 4.8.0, 6
> March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8"
> LIBJSON="UNKNOWN" RASTER
>
> SRID=4326;POLYGON((-71.0821 42.3036,-71.0821 67.3036,48.9179
> 67.3036,48.9179 42.3036,-71.0821 42.3036))
> }}}
>
> Which makes sense if we drop the M as I would expect it to.
>
> In 2.1.0 branch
>
> {{{
> -- PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit
> POSTGIS="2.1.0rc3 r11766" GEOS="3.5.0dev-CAPI-1.9.0 r0" PROJ="Rel. 4.8.0,
> 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8"
> LIBJSON="UNKNOWN" RASTER
>
> ERROR: Operation on mixed SRID geometries
> CONTEXT: PL/pgSQL function st_concavehull(geometry,double
> precision,boolean) line 63 at assignment
> ********** Error **********
> }}}
>
> This could be a bug in my code I suppose that it might be missing
> resetting the SRID but why it worked in 2.0.3 and not in 2.1.0 is a bit
> troubling.
New description:
This worked in 2.0.3
{{{
SELECT ST_ConcaveHull('SRID=4326;MULTIPOINTM(-71.0821 42.3036 1,-71.0821
67.3036 1,-56.0821 42.3036 1,-56.0821 67.3036 1,-41.0821 42.3036
1,-41.0821 67.3036 1,-26.0821 42.3036 1,-26.0821 67.3036 1,-11.0821
42.3036 1,-11.0821 67.3036 1,3.9179 42.3036 1,3.9179 67.3036 1,18.9179
42.3036 1,18.9179 67.3036 1,33.9179 42.3036 1,33.9179 67.3036 1,48.9179
42.3036 1,48.9179 67.3036 1,-71.0821 42.3036 2,-71.0821 67.3036 2,-56.0821
42.3036 2,-56.0821 67.3036 2,-41.0821 42.3036 2,-41.0821 67.3036
2,-26.0821 42.3036 2,-26.0821 67.3036 2,-11.0821 42.3036 2,-11.0821
67.3036 2,3.9179 42.3036 2,3.9179 67.3036 2,18.9179 42.3036 2,18.9179
67.3036 2,33.9179 42.3036 2,33.9179 67.3036 2,48.9179 42.3036 2,48.9179
67.3036 2)'::geometry
, 0.5,false)
}}}
and gave answer:
{{{
-- The ST_AsEWKT output
-- PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit
POSTGIS="2.0.3 r11132" GEOS="3.5.0dev-CAPI-1.9.0 r0" PROJ="Rel. 4.8.0, 6
March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8"
LIBJSON="UNKNOWN" RASTER
SRID=4326;POLYGON((-71.0821 42.3036,-71.0821 67.3036,48.9179
67.3036,48.9179 42.3036,-71.0821 42.3036))
}}}
Which makes sense if we drop the M as I would expect it to.
In 2.1.0 branch
{{{
-- PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit
POSTGIS="2.1.0rc3 r11766" GEOS="3.5.0dev-CAPI-1.9.0 r0" PROJ="Rel. 4.8.0,
6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8"
LIBJSON="UNKNOWN" RASTER
ERROR: Operation on mixed SRID geometries
CONTEXT: PL/pgSQL function st_concavehull(geometry,double
precision,boolean) line 63 at assignment
********** Error **********
}}}
This could be a bug in my code I suppose that it might be missing
resetting the SRID but why it worked in 2.0.3 and not in 2.1.0 is a bit
troubling.
--
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2433#comment:3>
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-tickets
mailing list