Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

metadata flag to trigger bounds recalculation

This is useful because when an empty bounds is set and the user modifies
the layer, it gets set to something other than empty bounds, even though
the user didn't touch the bounds in the ui. This forces recalculation
regardless.
  • Loading branch information...
commit e7fa2b31b2d8452eaf71d5853f39b76dafd1a607 1 parent 4b4767b
@rmarianski rmarianski authored
View
3  importer/src/main/java/org/opengeo/data/importer/Importer.java
@@ -776,7 +776,8 @@ void doIndirectImport(ImportTask task, ImportFilter filter) throws IOException {
// the result of a transform. there may be another way...
FeatureTypeInfo resource = getCatalog().getResourceByName(
featureType.getQualifiedName(), FeatureTypeInfo.class);
- if (resource.getNativeBoundingBox().isEmpty()) {
+ if (resource.getNativeBoundingBox().isEmpty()
+ || resource.getMetadata().get("recalculate-bounds") != null) {
// force computation
CatalogBuilder cb = new CatalogBuilder(getCatalog());
ReferencedEnvelope nativeBounds = cb.getNativeBounds(resource);
View
1  importer/src/main/java/org/opengeo/data/importer/format/KMLFileFormat.java
@@ -274,6 +274,7 @@ public SimpleFeatureType convertParsedFeatureType(SimpleFeatureType ft, String n
resource.setNativeCRS(KML_CRS);
resource.setNativeBoundingBox(EMPTY_BOUNDS);
resource.setLatLonBoundingBox(EMPTY_BOUNDS);
+ resource.getMetadata().put("recalculate-bounds", Boolean.TRUE);
Map<Object, Object> userData = featureType.getUserData();
if (userData.containsKey("schemaname")) {
Please sign in to comment.
Something went wrong with that request. Please try again.