Skip to main content
Added groovy code for feature creation
Source Link
sdev
  • 51
  • 3

Groovy Code to generate the feature

geometryFactory = JTSFactoryFinder.getGeometryFactory(null)

SimpleFeature toOpenGIS(Feature feature) {
        def point = geometryFactory.createPoint(new Coordinate(feature.geometry.asPoint().location.longitude,
                feature.geometry.asPoint().location.latitude))
        builder.set("Location", point)
        builder.set("Name", feature.name)
        builder.buildFeature(feature.id)
    }

Groovy Code to generate the feature

geometryFactory = JTSFactoryFinder.getGeometryFactory(null)

SimpleFeature toOpenGIS(Feature feature) {
        def point = geometryFactory.createPoint(new Coordinate(feature.geometry.asPoint().location.longitude,
                feature.geometry.asPoint().location.latitude))
        builder.set("Location", point)
        builder.set("Name", feature.name)
        builder.buildFeature(feature.id)
    }
Added output from DescribeFeatureType request.
Source Link
sdev
  • 51
  • 3

DescribeFeatureType request

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:trueDb="trueDb" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="trueDb">
  <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://localhost:8080/geoserver/schemas/gml/3.2.1/gml.xsd"/>
</xsd:schema>

DescribeFeatureType request

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:trueDb="trueDb" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="trueDb">
  <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://localhost:8080/geoserver/schemas/gml/3.2.1/gml.xsd"/>
</xsd:schema>
added 2 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

The QGIS error references Complex Features, which I’ve seen elsewhere cannot be imported directly. Is

If this is true? If so, how can I get my feature layer to integrate with QGIS? I’ve

I’ve seen reference to GDAL and GMLAS, although the later seems to be a command line tool for XML to GML conversion. Is

If this is not the way to go? Or, can QGIS be convinced to accept a Geometry/Point?

The QGIS error references Complex Features, which I’ve seen elsewhere cannot be imported directly. Is this true? If so, how can I get my feature layer to integrate with QGIS? I’ve seen reference to GDAL and GMLAS, although the later seems to be a command line tool for XML to GML conversion. Is this the way to go? Or can QGIS be convinced to accept a Geometry/Point?

The QGIS error references Complex Features, which I’ve seen elsewhere cannot be imported directly.

If this is true, how can I get my feature layer to integrate with QGIS?

I’ve seen reference to GDAL and GMLAS, although the later seems to be a command line tool for XML to GML conversion.

If this is not the way to go, can QGIS be convinced to accept a Geometry/Point?

Source Link
sdev
  • 51
  • 3
Loading