[postgis-devel] WKT and Wikipedia

Paul Ramsey pramsey at cleverelephant.ca
Thu Jul 3 10:33:07 PDT 2008


That would be wise. It won't protect against breaking, but it will at
least make it easy to retrofit old code without re-writing it
completely.

On Thu, Jul 3, 2008 at 9:43 AM, Martin Davis <mbdavis at refractions.net> wrote:
> Agreed.
>
> Although this is still going to break a lot of code that expects the old
> style WKT.  Perhaps it would be possible to provide a function which
> produces the old style for a few releases?
>
> Paul Ramsey wrote:
>>
>> Be liberal in what you accept and strict in what you emit.  The
>> question is, whose rules should we adhere to?  I guess, really the new
>> rules are the only super-official ones, since the old SFSQL never
>> actually went beyond 2D.
>>
>> P.
>>
>> On Mon, Jun 30, 2008 at 3:25 PM, Kevin Neufeld <kneufeld at refractions.net>
>> wrote:
>>
>>>
>>> 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
>>>>
>>>
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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