0

Is there a way to get line and polygon data without the MultiGeometry Wrapper from a geoserver layer when accessing via the KML Reflector method? It always generates additional Point data for Lines and Polygons. QGIS unfortunately doesn't support wrapped MultiGeometry data. So in QGIS this Data is not valid (Error Message: Unsupported geometry type 'Unknown type' in layer ...):

<MultiGeometry>
      <Point>
         <coordinates>15.007516282814333,48.86425868847214</coordinates>
      </Point>
      <LineString>
         <coordinates>15.00746377393497,48.86434478906123 15.00748822834979,48.86430296174839 15.00757027103822,48.86417348864424</coordinates>
      </LineString>
</MultiGeometry>

While this would work:

<LineString>
     <coordinates>15.00746377393497,48.86434478906123 15.00748822834979,48.86430296174839 15.00757027103822,48.86417348864424</coordinates>
</LineString>

The data is stored in a postgres DB. The geometry type in the sql query for the geoserver layer is set to LineString and EPSG:4326. The sld used on this layer is the default simple blue line.

Any ideas how to access KML Data from geoserver so it can be read by QGIS? Running and converting the data using ogr2ogr is not an option (the data must be accessible via REST).

  • 1
    why not use the WFS and GML where this is all well defined? – Ian Turton Sep 25 '17 at 10:44
  • thanks - using wfs, requesting the data as gml and renaming the file as kml does the trick. I thought using KML Reflector method would be the best way for requesting kml data - wrong me... – öbl Sep 25 '17 at 11:17
  • I suppose that MultiGeometry is there intentionally osgeo-org.1560.x6.nabble.com/…. The problem is that QGIS is not the best client for viewing GeometryCollections. Good that WFS gives an alternative. – user30184 Sep 25 '17 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.