[postgis-devel] Inconsistency in Measured Geometries

strk at refractions.net strk at refractions.net
Sun Jan 16 01:10:02 PST 2005

On Sat, Jan 15, 2005 at 01:34:06PM +0100, Markus Schaber wrote:
> Hello,
> While reworking the PostGIS JDBC code, I stumbled over a inconsistency
> in WKT of measured Geometries. Weird that I did not notice this earlier.
> 2d Geometries with measure have a "M" appended to their name in the WKT,
> but 3d Geometries with measure do not have such an M, but look like 4d
> Geometries.
> It would be more consistent to have measured 3d geometries also have the
> M appended to the name. (Maybe we even get 4d geometries some time (3d +
> time) that come with and without measure.)

Implementation choice as been taken looking at backward compatibility.
Old postgis supported 2d/3d, so their EWKT are compatible with that.
The 'M' has been added for the sole purpose of distinguish between
3dZ and 3dM geoms. More consistency in general would be:
As both Z and M are nore *real* dimensions, just an additional info
on each coordinate. 

> I did not look at the C code yet, but at least on the Java side it would
> make the code a little simpler. I also think that this consistency may
> be a plus point for getting OpenGIS approval of EWKT. But, on the other
> hand, it may be too late to change this in the implementation,
> especially as RC1 is out.

How does simplicity come from the M addition ?
In the C code we have abstract points with a variable number of
coordinates: 2d,3d,4d. Number of coordinates are extracted from
number of values in EWKT [1 2, 1 2 3, 1 2 3 4]. The M just tells
us that the [1 2 3] case is XYM instead of XYZ, other cases are
implicitly XY XYZ XYZM.

> Thanks for your patience,
> and have a nice weekend!
> Markus

Thank you for storming.

> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


For standing up against patentability of software,

  Thank You, Poland!

Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
Send your thanks:         thankyoupoland.info
Read/do more:		  http://www.noepatents.org/

More information about the postgis-devel mailing list