[postgis-devel] WKT and Wikipedia

Martin Davis mbdavis at refractions.net
Fri Jun 27 17:31:48 PDT 2008


That's a tough one, alright.  Why the !@#$ did OGC break backwards 
compatibility with the 1.2 WKT spec?  Almost makes me say "is it really 
worth constantly dancing around trying to keep up with their arbitrary 
spec changes"?

Is it worth having a compability mode which will emit the old WKT, and 
have ST_AsText emit the new stuff?  Either as a flag on the function, or 
as a separate function?  Will still break a lot of stuff, though.

Paul Ramsey wrote:
> Yes, handling POINT M, POINT Z, and POINT ZM is a good thing for 1.4.
> That's an addition to the parser (I can put my new lex/yacc book to
> use :). The hard question is what to *emit* in response to an
> ST_AsText() :)
>
> P.
>
> PS - those are the ISO wkt forms too.
>
> On Fri, Jun 27, 2008 at 4:42 PM, Kevin Neufeld <kneufeld at refractions.net> wrote:
>   
>> So, the 1.2 OGC specs require that the WKT of Z, M, and ZM be:
>> POINT <point text>
>> POINT Z <point z text>
>> POINT M <point m text>
>> POINT ZM <point zm text>
>>
>> PostGIS has:
>> POINT <point text> | <point z text>
>> POINTM <point m text> | <point zm text>
>>
>> To me, this means PostGIS is not entirely OGC compliant. (ie. PostGIS can't
>> parse an OGC compliant WKT string)
>>
>> postgis=# SELECT 'POINT ZM(0 0 0 0)'::geometry;
>> ERROR:  parse error - invalid geometry
>>
>> Same goes for the textual representation of other geometries.
>> ie. LINESTRING ZM (...)
>>
>> Should we add this to the TODO list for 1.4?  Or is there a specs gray area
>> ... that we're compliant enough.
>>
>> -- Kevin
>>
>> Martin Davis wrote:
>>     
>>> Actually the latest SFS 1.2 spec does include a spec for 2D measured, 3D &
>>> 3D measured WKT.  See here:
>>>
>>> http://www.opengeospatial.org/standards/sfa
>>>
>>> (This is also referenced on the wiki page)
>>>
>>>
>>>
>>> Kevin Neufeld wrote:
>>>       
>>>> I just came across this page:
>>>> http://en.wikipedia.org/wiki/Well-known_text
>>>>
>>>> I think this page is incorrect, misleading, and contains typos.  It is my
>>>> understanding that the OGC specs on WKT does *not* include 3D and 4D
>>>> definitions.  It is a PostGIS extension to use Z, M, or ZM. Or am I off on
>>>> this?
>>>> (http://portal.opengeospatial.org/files/?artifact_id=829) (section
>>>> 3.2.5.2)
>>>>
>>>> I don't have an account to correct this.  Does any here have one?  Do we
>>>> care?
>>>>
>>>> Should the new PostGIS docs reference such pages, or point to only the
>>>> OGC specs?
>>>>
>>>> -- Kevin
>>>> _______________________________________________
>>>> postgis-devel mailing list
>>>> postgis-devel at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>>
>>>>         
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>
>>     
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>   

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022




More information about the postgis-devel mailing list