[postgis-devel] WKT and Wikipedia

Kevin Neufeld kneufeld at refractions.net
Mon Jun 30 15:25:35 PDT 2008


That is a good question.  Since it looks like we going to break people 
code anyway ... to be true to the spec, I assume this also means that 
the parser should error out if someone tried to supply 3 or 4 dimensions 
without using the POINT Z, POINT M, or POINT ZM syntax.

We could try to be backwards compatible and continue to allow the use of 
'POINT' for 3D/4D coordinates, but as Martin pointed out, we would no 
longer be compliant with the standard since the OGC standard itself is 
not backwards compatible.

Choose your poison, eh?

-- Kevin

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



More information about the postgis-devel mailing list