diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java index 0fff49372910c1223b589dbea32ed8a19cb85bd8..e377d32da5ecf712c928a438f379ffced2e268fc 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java @@ -32,8 +32,8 @@ import org.opengroup.osdu.indexer.schema.converter.tags.VirtualProperties; import org.opengroup.osdu.indexer.schema.converter.tags.VirtualProperty; import org.opengroup.osdu.indexer.util.VirtualPropertyUtil; import org.opengroup.osdu.indexer.util.geo.decimator.DecimatedResult; -import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimationSetting; import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimator; +import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimationSetting; import org.springframework.stereotype.Component; import javax.inject.Inject; @@ -235,15 +235,15 @@ public class StorageIndexerPayloadMapper { }); if(virtualPropertyPath.equals(VirtualPropertyUtil.VIRTUAL_DEFAULT_LOCATION) && - dataCollectorMap.containsKey(VirtualPropertyUtil.VIRTUAL_DEFAULT_LOCATION_WGS84_PATH)) { + dataCollectorMap.containsKey(VirtualPropertyUtil.VIRTUAL_DEFAULT_LOCATION_WGS84_PATH)) { originalGeoShapeProperty = originalPropertyPath + VirtualPropertyUtil.FIELD_WGS84_COORDINATES; } } // No VirtualProperties.DefaultLocation.Wgs84Coordinates defined, use the default geo-shape property - if (originalGeoShapeProperty == null && decimationSetting.isDecimationEnabled()) + if (originalGeoShapeProperty == null) originalGeoShapeProperty = getDefaultGeoShapeProperty(dataCollectorMap); - if(originalGeoShapeProperty != null) { + if(originalGeoShapeProperty != null && decimationSetting.isDecimationEnabled()) { try { decimateGeoShape(originalGeoShapeProperty, dataCollectorMap); } catch (JsonProcessingException ex) { diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java index b3bfb87f6dfaf3e03546bc0c7d718bf3b5383011..8a6c64d60ab28274c29935cfcebf23de59c05288 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java @@ -12,6 +12,7 @@ import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.core.common.model.indexer.IndexSchema; import org.opengroup.osdu.core.common.model.indexer.JobStatus; +import org.opengroup.osdu.core.common.partition.*; import org.opengroup.osdu.indexer.schema.converter.config.SchemaConverterPropertiesConfig; import org.opengroup.osdu.indexer.schema.converter.exeption.SchemaProcessingException; import org.opengroup.osdu.indexer.schema.converter.interfaces.IVirtualPropertiesSchemaCache;