[postgis] request slight change to jdbc code

James Macgill J.Macgill at geography.leeds.ac.uk
Tue Aug 7 14:50:33 PDT 2001


I have been adding support to GeoTools for postgis and I have had to make a 
slight modification to one of the jdbc java files, could you fold this in 
please?

By making the geometry type identifiers final as well as static they can be 
used directly in switch statements.

Cheers

James

-- 
James Macgill
Center for Computational Geography
Spell Checker (c) Creative Spelling inc (aka my dyslexic brain)
http://geotools.sourceforge.net a client side java mapping toolkit.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

-------------- next part --------------
package org.postgis;

public class Geometry 
{

	/**
	 * The dimensionality of this feature (2,3)
	 */
	public int dimension;
	
	/**
	 * The OGIS geometry type of this feature.
	 */
	public int type;

	/**
	 * The OGIS geometry type number for points.
	 */
	public static final int POINT = 1;

	/**
	 * The OGIS geometry type number for lines.
	 */
	public static final int LINESTRING = 2;

	/**
	 * The OGIS geometry type number for polygons.
	 */
	public static final int POLYGON = 3;

	/**
	 * The OGIS geometry type number for aggregate points.
	 */
	public static final int MULTIPOINT = 4;

	/**
	 * The OGIS geometry type number for aggregate lines.
	 */
	public static final  int MULTILINESTRING = 5;

	/**
	 * The OGIS geometry type number for aggregate polygons.
	 */
	public static final int MULTIPOLYGON = 6;
	
	/**
	 * The OGIS geometry type number for feature collections.
	 * Feature collections are not currently supported by the
	 * backend.
	 */
	public static final int GEOMETRYCOLLECTION = 7;
	
	/**
	 * @return The OGIS geometry type number of this geometry.
	 */
	public int getType() {
		return type;
	}
	
	/**
	 * @return The dimensionality (eg, 2D or 3D) of this geometry.
	 */
	public int getDimension() {
		return dimension;
	}

}


More information about the postgis-users mailing list