[geos-devel] Why WKBConstants is a namespace?

strk at refractions.net strk at refractions.net
Mon Mar 20 07:18:41 EST 2006


On Mon, Mar 20, 2006 at 01:13:32PM +0100, Mateusz Å?oskot wrote:
> Why WKBConstants is a namespace instead of enum?

It was a namespace in Java (an interface):

public interface WKBConstants {
  int wkbXDR = 0;
  int wkbNDR = 1;

  int wkbPoint = 1;
  int wkbLineString = 2;
  int wkbPolygon = 3;
  int wkbMultiPoint = 4;
  int wkbMultiLineString = 5;
  int wkbMultiPolygon = 6;
  int wkbGeometryCollection = 7;
}
 
As you can see an enum won't be able to hold wkbPoint
and wkbNDR  with the same value.
Also, it might grow including flags for dimensionality
and SRID presence or whatever ends up being a WKB
constant.

--strk;



More information about the geos-devel mailing list