Jacky Tang <jt...@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
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to