[geos-devel] Dimension and Coordinate Sequences

strk strk at keybit.net
Mon May 17 11:32:54 EDT 2010


On Mon, May 17, 2010 at 11:25:56AM -0400, Frank Warmerdam wrote:
> Folks,
> 
> I am creating a GEOS Point from 2D WKB input, then fetching back the
> CoordinateSequence and interogating it's dimension.  I get "3".
> 
> Looking through the code there does not seem to be a real effort to preserve
> dimension for coordinate sequences, at least with the 
> CoordinateArraySequence
> implementation.  Is this intentional?

The interface was added to later make a real effort,
but none is made at this time indeed.

When non-empty you could check for IsNan(Z) but when empty you can't tell..
 
> As the Z coordinate is NaN I'll try and adapt my code to watch for that as
> a clue to dimension but it is not entirely clear to me why dimension is not
> currently preserved.

PostGIS extracts dimension from postgis format, then converts, does the thing
and converts back to same dimension of input.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the geos-devel mailing list