[gdal-dev] OGR Style is null for Geometry Collections

Jacky Tang jtang at nltinc.com.au
Tue Mar 22 17:30:52 PDT 2022


Jacky Tang <jtang at nltinc.com.au>
08:29 (2 hours ago)
to gdal-dev
Hello,

I am having some issues retrieving the OGR style with ogr2ogr for geometry
collections, as it returns null and the geometries themselves do not
include OGR style. Any assistance would be greatly appreciated!

ogr2ogr
  -f geojson
  -s_srs "EPSG:2000"
  -t_srs "EPSG:4326"
  -dialect sqlite -sql "select layer, geometry, ogr_style from entities"
  -lco RFC7946=YES
  -skipfailures
  "map.geojson"
  "map.dwg"

I have also tried `select *, ogr_style` with no luck either.

Example output GeometryCollection:
{
    "type": "Feature",
    "properties": {
        "Layer": "1",
        "OGR_STYLE": null
    },
    "geometry": {
        "type": "GeometryCollection",
        "geometries": [
            {
                "type": "LineString",
                "coordinates": [
                    [
                        -55.9868404,
                        67.0981691,
                        167.342
                    ],
                    [
                        -55.986836,
                        67.0981869,
                        167.342
                    ]
                ]
            },
            {
                "type": "LineString",
                "coordinates": [
                    [
                        -55.9868611,
                        67.0981788,
                        167.342
                    ],
                    [
                        -55.9868153,
                        67.0981771,
                        167.342
                    ]
                ]
            }
        ]
    }
}


Thanks!

Kindest Regards,
Jacky
Software Engineer
NLT Digital
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220323/6d4426ab/attachment.html>


More information about the gdal-dev mailing list