[Schmitzm-commits] r1056 - branches/2.2.x/src/schmitzm/geotools/feature
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 23 22:06:08 CEST 2010
Author: mojays
Date: 2010-09-23 22:06:07 +0200 (Thu, 23 Sep 2010)
New Revision: 1056
Modified:
branches/2.2.x/src/schmitzm/geotools/feature/FeatureUtil.java
Log:
Use of FeatureUtil.isGeometryType(.) instead of "instanceof"
Modified: branches/2.2.x/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- branches/2.2.x/src/schmitzm/geotools/feature/FeatureUtil.java 2010-09-23 17:38:23 UTC (rev 1055)
+++ branches/2.2.x/src/schmitzm/geotools/feature/FeatureUtil.java 2010-09-23 20:06:07 UTC (rev 1056)
@@ -311,7 +311,7 @@
for (int j = 0; j < f.getFeatureType().getAttributeCount(); j++)
// if ( f.getFeatureType().getAttributeType(j).isGeometry() )
- if (f.getFeatureType() instanceof GeometryAttributeType)
+ if ( isGeometryAttribute(f.getFeatureType()) )
geomVec.add(f.getAttribute(j));
Geometry[] geomArr = new Geometry[geomVec.size()];
@@ -757,8 +757,8 @@
try {
builder.add(aType);
- if (aType instanceof GeometryAttributeType
- && builder.getDefaultGeometry() == null)
+ if ( isGeometryAttribute(aType) &&
+ builder.getDefaultGeometry() == null)
builder.setDefaultGeometry(aType.getLocalName());
} catch (IllegalArgumentException err) {
builder.add(AttributeTypeFactory.newAttributeType(aType
More information about the Schmitzm-commits
mailing list