[postgis-users] Can not mix dimensionality in a geometry

Paul Ramsey pramsey at refractions.net
Fri Jan 13 09:46:55 PST 2006


Martin,

It does not work because (wait for it...) you have input a geometry  
with mixed dimensionality in your query.

The fourth vertex in your polygon is 3D. It looks like it is  
inadvertently caused by a missing comma which spliced two coordinates  
together.

Finally, the point of a test server is to exercise your application  
in exactly the same environment as it will encounter on your  
production server, so that you know it is reliable before you put it  
into production.  The versions of infrastructure software (OS,  
libraries, database, spatial extension) are just as important to this  
process of stability validation as the versions of your own  
software.  Some outfits go so far as to ensure the hardware is  
identical too.

Paul

On 13-Jan-06, at 7:17 AM, Martin Høgh wrote:

> Dear List,
> I've moved a working postgis test db onto a production server and  
> suddenly ran into an error.
>
> "ERROR:  Can not mix dimensionality in a geometry"
>
> The version of production server:
>
> "PostgreSQL 8.1.2 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)  
> 3.4.2 (mingw-special)"
> "1.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"
>
> The version of test server:
> "PostgreSQL 7.3.4-RH on i386-redhat-linux-gnu, compiled by GCC i386- 
> redhat-linux-gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)"
> "0.8 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"
>
> And the query that cause the error:
>
> select asText(transform(the_geom,32632)) as geometry,gid,* from wpt  
> where transform(GeometryFromText('POLYGON((568861.86  
> 6334089.98,572060.09 6334089.98,572060.09 6336265.82,568861.86  
> 6336265.82568861.86 6334089.98,568861.86 6334089.98))',32632),4326)  
> && the_geom and intersects(transform(GeometryFromText('POLYGON 
> ((568861.86 6334089.98,572060.09 6334089.98,572060.09  
> 6336265.82,568861.86 6336265.82568861.86 6334089.98,568861.86  
> 6334089.98))',32632),4326),the_geom)
>
> Why does it not work on the production server.
>
> Best regards,
>
> Martin
> mapuse.net
>
> _______________________________________________
> 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