Skip to content
Snippets Groups Projects
Commit 05f1aa65 authored by Zhibin Mai's avatar Zhibin Mai
Browse files

Rollback change

parent cf1dc89a
No related branches found
No related tags found
1 merge request!486Enable the feature flag for geo-shape decimation by default
Pipeline #167040 failed
Pipeline: Indexer

#167041

    ......@@ -32,6 +32,7 @@ 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.springframework.stereotype.Component;
    ......@@ -57,6 +58,8 @@ public class StorageIndexerPayloadMapper {
    private IVirtualPropertiesSchemaCache virtualPropertiesSchemaCache;
    @Inject
    private GeoShapeDecimator decimator;
    @Inject
    private GeoShapeDecimationSetting decimationSetting;
    public Map<String, Object> mapDataPayload(IndexSchema storageSchema, Map<String, Object> storageRecordData,
    String recordId) {
    ......@@ -238,7 +241,7 @@ public class StorageIndexerPayloadMapper {
    }
    // No VirtualProperties.DefaultLocation.Wgs84Coordinates defined, use the default geo-shape property
    if (originalGeoShapeProperty == null)
    if (originalGeoShapeProperty == null && decimationSetting.isDecimationEnabled())
    originalGeoShapeProperty = getDefaultGeoShapeProperty(dataCollectorMap);
    if(originalGeoShapeProperty != null) {
    try {
    ......
    ......@@ -20,10 +20,7 @@ import org.opengroup.osdu.indexer.service.mock.PartitionFactoryMock;
    import org.opengroup.osdu.indexer.service.mock.PartitionProviderMock;
    import org.opengroup.osdu.indexer.service.mock.ServiceAccountJwtClientMock;
    import org.opengroup.osdu.indexer.service.mock.VirtualPropertiesSchemaCacheMock;
    import org.opengroup.osdu.indexer.util.geo.decimator.DecimationSettingCache;
    import org.opengroup.osdu.indexer.util.geo.decimator.DouglasPeuckerReducer;
    import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimator;
    import org.opengroup.osdu.indexer.util.geo.decimator.GeometryDecimator;
    import org.opengroup.osdu.indexer.util.geo.decimator.*;
    import org.opengroup.osdu.indexer.util.parser.BooleanParser;
    import org.opengroup.osdu.indexer.util.parser.DateTimeParser;
    import org.opengroup.osdu.indexer.util.parser.GeoShapeParser;
    ......@@ -47,7 +44,7 @@ import static org.junit.Assert.*;
    @SpringBootTest(classes = {StorageIndexerPayloadMapper.class, AttributeParsingServiceImpl.class, NumberParser.class,
    BooleanParser.class, DateTimeParser.class, GeoShapeParser.class, DouglasPeuckerReducer.class, GeoShapeDecimator.class,
    GeometryDecimator.class, GeometryConversionService.class, DecimationSettingCache.class,
    DpsHeaders.class, JobStatus.class, SchemaConverterPropertiesConfig.class, JaxRsDpsLog.class,
    GeoShapeDecimationSetting.class, DpsHeaders.class, JobStatus.class, SchemaConverterPropertiesConfig.class, JaxRsDpsLog.class,
    PartitionFactoryMock.class, PartitionProviderMock.class, ServiceAccountJwtClientMock.class, VirtualPropertiesSchemaCacheMock.class, })
    public class StorageIndexerPayloadMapperTest {
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment