Search in sources :

Example 1 with MdAttributeGeometryDAOIF

use of com.runwaysdk.gis.dataaccess.MdAttributeGeometryDAOIF in project geoprism-registry by terraframe.

the class ListTypeShapefileExporter method createFeatureType.

public SimpleFeatureType createFeatureType() {
    MdAttributeGeometryDAOIF geometryAttribute = (MdAttributeGeometryDAOIF) this.mdBusiness.definesAttribute(RegistryConstants.GEOMETRY_ATTRIBUTE_NAME);
    SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
    builder.setName(this.list.getDisplayLabel().getValue());
    builder.setCRS(DefaultGeographicCRS.WGS84);
    builder.add(GEOM, this.getShapefileType(geometryAttribute), 4326);
    this.mdAttributes.forEach(attribute -> {
        builder.add(generateColumnName(attribute.definesAttribute()), this.getShapefileType(attribute));
    });
    return builder.buildFeatureType();
}
Also used : SimpleFeatureTypeBuilder(org.geotools.feature.simple.SimpleFeatureTypeBuilder) MdAttributeGeometryDAOIF(com.runwaysdk.gis.dataaccess.MdAttributeGeometryDAOIF)

Example 2 with MdAttributeGeometryDAOIF

use of com.runwaysdk.gis.dataaccess.MdAttributeGeometryDAOIF in project geoprism-registry by terraframe.

the class MasterListShapefileExporter method createFeatureType.

public SimpleFeatureType createFeatureType() {
    MdAttributeGeometryDAOIF geometryAttribute = (MdAttributeGeometryDAOIF) this.mdBusiness.definesAttribute(RegistryConstants.GEOMETRY_ATTRIBUTE_NAME);
    SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
    builder.setName(this.list.getDisplayLabel().getValue());
    builder.setCRS(DefaultGeographicCRS.WGS84);
    builder.add(GEOM, this.getShapefileType(geometryAttribute), 4326);
    this.mdAttributes.forEach(attribute -> {
        builder.add(generateColumnName(attribute.definesAttribute()), this.getShapefileType(attribute));
    });
    return builder.buildFeatureType();
}
Also used : SimpleFeatureTypeBuilder(org.geotools.feature.simple.SimpleFeatureTypeBuilder) MdAttributeGeometryDAOIF(com.runwaysdk.gis.dataaccess.MdAttributeGeometryDAOIF)

Aggregations

MdAttributeGeometryDAOIF (com.runwaysdk.gis.dataaccess.MdAttributeGeometryDAOIF)2 SimpleFeatureTypeBuilder (org.geotools.feature.simple.SimpleFeatureTypeBuilder)2