@Override protected SimpleFeatureType[] getTypes() { return new SimpleFeatureType[] { SimpleFeatureUserDataConfigurationSet.configureType(tdrivepointType)}; }
public SimpleFeatureTranslator( final SimpleFeatureType originalType, final Collection<String> fields) { this.fields = fields; initialize(originalType); }
public FeatureTranslatingIterator( final SimpleFeatureType originalType, final Collection<String> desiredFields, final CloseableIterator<SimpleFeature> originalFeatures) { translator = new SimpleFeatureTranslator(originalType, desiredFields); iteratorDelegate = originalFeatures; }
public boolean init(final DataStorePluginOptions dataStore, final String typeName) { featureType = FeatureDataUtils.getFeatureType(dataStore, typeName); if (featureType == null) { return false; } schema = SchemaConverter.schemaFromFeatureType(featureType); if (schema == null) { return false; } GeomFunctionRegistry.registerGeometryFunctions(sparkSession); return true; }
/** * Constructor<br> Creates a new SimpleFeatureUserDataConfigurationSet configured using the passed * in SimpleFeature type and adding the passed in configurations. Will be accessed using the type * name. * * @param type * @param configurations */ public SimpleFeatureUserDataConfigurationSet( final SimpleFeatureType type, final List<SimpleFeatureUserDataConfiguration> configurations) { super(); getConfigurationsForType(type.getTypeName()).addAll(configurations); configureFromType(type); }
/** * Compose a query from the set of constraints. When the provided constraints do not fulfill the * indexed dimensions, compose constraints from statistics. * * @param featureType * @param timeDescriptors * @param statsMap * @param jtsBounds * @param timeBoundsSet * @return */ public static Constraints composeConstraints( final SimpleFeatureType featureType, final TimeDescriptors timeDescriptors, final Map<StatisticsId, InternalDataStatistics<SimpleFeature, ?, ?>> statsMap, final Geometry jtsBounds, final TemporalConstraintsSet timeBoundsSet) { final Constraints timeConstraints = composeTimeConstraints(featureType, timeDescriptors, statsMap, timeBoundsSet); final GeoConstraintsWrapper geoConstraints = composeGeometricConstraints(featureType, statsMap, jtsBounds); return timeConstraints.merge(geoConstraints.getConstraints()); } }
/** * Add the passed in configuration to the list of configurations for the specified type name * * @param typeName - name of type which will get an added configuration * @param config - configuration to be added */ public void addConfigurations(String typeName, final SimpleFeatureUserDataConfiguration config) { getConfigurationsForType(typeName).add(config); }
@Override public SimpleFeature next() { return translator.translate(iteratorDelegate.next()); }
protected Geometry clipIndexedBBOXConstraints(final Geometry bbox) { return QueryIndexHelper.clipIndexedBBOXConstraints( getFeatureType(), bbox, transaction.getDataStatistics()); }
private FeatureDataAdapter createOutputAdapter( final DataStorePluginOptions originalOptions, final String originalTypeName, final Index[] indices, String outputTypeName) { if (outputTypeName == null) { outputTypeName = createDefaultAdapterTypeName(originalTypeName, originalOptions); } final FeatureDataAdapter newAdapter = FeatureDataUtils.cloneFeatureDataAdapter(originalOptions, originalTypeName, outputTypeName); newAdapter.init(indices); return newAdapter; }
protected TemporalConstraintsSet clipIndexedTemporalConstraints( final TemporalConstraintsSet constraintsSet) { return QueryIndexHelper.clipIndexedTemporalConstraints( transaction.getDataStatistics(), components.getAdapter().getTimeDescriptors(), constraintsSet); }
public double getAreaSimple(Geometry polygon) throws Exception { Point centroid = polygon.getCentroid(); CoordinateReferenceSystem equalAreaCRS = lookupUtmCrs(centroid.getY(), centroid.getX()); MathTransform transform = CRS.findMathTransform(DefaultGeographicCRS.WGS84, equalAreaCRS, true); Geometry transformedPolygon = JTS.transform(polygon, transform); return transformedPolygon.getArea() * SQM_2_SQKM; }
@Override protected SimpleFeatureType[] getTypes() { return new SimpleFeatureType[] { SimpleFeatureUserDataConfigurationSet.configureType(gdeltEventType)}; }
public static FeatureDataAdapter cloneFeatureDataAdapter( final DataStorePluginOptions storeOptions, final String originalTypeName, final String newTypeName) { // Get original feature type info final SimpleFeatureType oldType = FeatureDataUtils.getFeatureType(storeOptions, originalTypeName); // Build type using new name final SimpleFeatureTypeBuilder sftBuilder = new SimpleFeatureTypeBuilder(); sftBuilder.init(oldType); sftBuilder.setName(newTypeName); final SimpleFeatureType newType = sftBuilder.buildFeatureType(); // Create new adapter that will use new typename final FeatureDataAdapter newAdapter = new FeatureDataAdapter(newType); return newAdapter; }
/** * Constructor<br> Creates a new SimpleFeatureUserDataConfigurationSet configured using the passed * in SimpleFeature type. Will be accessed using the type name. * * @param type - SFT to be configured */ public SimpleFeatureUserDataConfigurationSet(final SimpleFeatureType type) { List<SimpleFeatureUserDataConfiguration> sfudc = getConfigurationsForType(type.getTypeName()); for (final SimpleFeatureUserDataConfiguration configuration : sfudc) { configuration.configureFromType(type); } }
@Override protected SimpleFeatureType[] getTypes() { return new SimpleFeatureType[] { SimpleFeatureUserDataConfigurationSet.configureType(twitterSft)}; }
/** * Updates the SFT with the entire list of SimpleFeatureUserDataConfiguration(s) * * @param type - SF type to be updated */ public void updateType(final SimpleFeatureType type) { List<SimpleFeatureUserDataConfiguration> sfudc = getConfigurationsForType(type.getTypeName()); // Go through list of SFUD configurations and update each one in the // passed in SF type for (final SimpleFeatureUserDataConfiguration configuration : sfudc) { configuration.updateType(type); } }
@Override protected SimpleFeatureType[] getTypes() { return new SimpleFeatureType[] { SimpleFeatureUserDataConfigurationSet.configureType(geolifePointType), SimpleFeatureUserDataConfigurationSet.configureType(geolifeTrackType)}; }
/** * Updates the entire list of SimpleFeatureUserDataConfiguration(s) with information from the * passed in SF type * * @param type - SF type to be updated */ public void configureFromType(final SimpleFeatureType type) { List<SimpleFeatureUserDataConfiguration> sfudc = getConfigurationsForType(type.getTypeName()); // Go through list of SFUD configurations and update each one with // information from the // passed in SF type for (final SimpleFeatureUserDataConfiguration configuration : sfudc) { configuration.configureFromType(type); } }
@Override protected SimpleFeatureType[] getTypes() { return new SimpleFeatureType[] { SimpleFeatureUserDataConfigurationSet.configureType(GPXConsumer.pointType), SimpleFeatureUserDataConfigurationSet.configureType(GPXConsumer.waypointType), SimpleFeatureUserDataConfigurationSet.configureType(GPXConsumer.trackType), SimpleFeatureUserDataConfigurationSet.configureType(GPXConsumer.routeType)}; }