GeoTools

Difference between FeatureBounds and FeatureCollectionBounds

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.5-M3
  • Fix Version/s: 2.7.5
  • Component/s: arcsde plugin
  • Labels:
    None

Description

We have a report of bounds calculations going astray from an ArcSDEDataStore FeatureID based query.

FeatureStore<SimpleFeatureType, SimpleFeature> store =
 highlightLayer.getResource(FeatureStore.class, null); FilterFactory ff =
 CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints()); if
 (featureId != null) {
 	FeatureCollection<SimpleFeatureType, SimpleFeature> result =
 store.getFeatures(ff.id(FeatureUtils.stringToId(ff, featureId)));
 System.out.println("Collenction bounds: "+result.getBounds());
 	iterator = result.features();
 	if (iterator.hasNext()) {
 		feature = iterator.next();
 		System.out.println("Feature bounds: "+feature.getBounds());
 		iterator.close();
 	}
 }

With the results:

Collenction bounds: ReferencedEnvelope[0.0 : 9.223372036854776E18, 0.0 : 9.223372036854776E18]
Feature bounds: ReferencedEnvelope[370196.28006616497 : 371785.09008811245, 533285.0981532441 : 534050.1321273892]

The bug report is from a fork of ArcSDEDataStore; the changes have been attached as a patch to an earlier bug Report. Gabriel and Jody reviewed the fork and although I cannot remember the details we could not understand / justify the changes made.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: