[postgis-devel] PostGIS RC1/2 and QGIS
Carl Anderson
carl.anderson at co.fulton.ga.us
Fri Feb 11 13:32:29 PST 2005
Gary Sherman wrote:
>On Fri, 2005-02-11 at 18:46 +0100, strk at refractions.net wrote:
>
>
>>On Fri, Feb 11, 2005 at 08:10:49AM -0900, Gary Sherman wrote:
>>
>>
>>>On Thu, 2005-02-10 at 09:30 -0500, Carl Anderson wrote:
>>>
>>>
>>>
>>>>mapserver 4.4.1 is working --- it uses this statement
>>>>
>>>>DECLARE mycursor BINARY CURSOR FOR SELECT
>>>>asbinary(force_collection(force_2d(shape)),'NDR'),geo_oid::text from
>>>>z2.case6 WHERE shape && setSRID('BOX3D(2228328.35384
>>>>1482507.61292179,2230568.16919753 1483897.32106711)'::BOX3D,
>>>>find_srid('','z2.case6','shape') )
>>>>
>>>>
>>>>
>>>I tried this syntax in QGIS and it does not allow the features to be
>>>drawn. The attribute table is populated with the data from the table so
>>>the cursor (both old and new syntax) is working.
>>>
>>>From this I gather the problem is in the way QGIS interprets the binary
>>>data for the features.
>>>-gary
>>>
>>>
>>This doesn't explain why it was working against postgis-0.x ...
>>Can you manually run the query and actually get results for the
>>geometry column ? Can you try with a newly created database
>>and the latest postgis CVS snapshot ?
>>
>>--strk;
>>
>>
>>
>I changed geometryfromtext to setsrid in the declare statement and now
>the features display (this is with RC2). My question is -- is this
>backwards compatible to 0.9x or do we have to implement different
>cursors to support previous versions of PostGIS?
>
>-gary
>
>
>
>
When they switched to LWGEOM (or if you enabled LWGEOM support in 0.9.0)
the parser for the GEOMETRY type got changed from geometry_in() to
lwgeom_in()
geometry_in() used to support parsing things like geometry('BOX3D(0 0,1
1)')
lwgeom_in() does not support those. IIRC it was because BOX3D is not an
OGC
geometry type but a postgis bolt on, and it was desired that
geometryfromtext()
only accept the OGC flavors.
with LWGEOM turned on (no choice in RC1/2) you have to use the old BOX3D
parser
which understands
'BOX3D(0 0,1 1)'::box3d
or
box3d('BOX3D(0 0,1 1)').
the box3d datatype and parser have been around for a long time. It was
part of postgis 0.5.1.
setsrid(BOX3D('BOX3D(0 0,1 1)'),2240)
or
setsrid('BOX3D(0 0,1 1)'::box3d,2240)
will work back to the earilier versions.
C.
>------------------------------------------------------------------------
>
>_______________________________________________
>postgis-devel mailing list
>postgis-devel at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
--
Carl Anderson
GIS Manager Fulton County, Georgia
carl.anderson at co.fulton.ga.us
404.730.8026
-----------------------------------------------------
This message has been scanned for viruses and
dangerous content for Fulton County by DefendMail, and is
believed to be clean.
More information about the postgis-devel
mailing list