Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogrinfo lacks -style=[YES/NO] #9974

Open
jidanni opened this issue May 21, 2024 · 1 comment
Open

ogrinfo lacks -style=[YES/NO] #9974

jidanni opened this issue May 21, 2024 · 1 comment

Comments

@jidanni
Copy link
Contributor

jidanni commented May 21, 2024

Feature description

We can control all the other properties, just not styles yet:

$ ogrinfo -q -geom=NO -fields=NO v.kmz vermilion_co_il

Layer name: vermilion_co_il
OGRFeature(vermilion_co_il):1
  Style = @tyle/style.kml#ourPolygonStyle

Additional context

https://gdal.org/user/ogr_feature_style.html#style-is-a-property-of-feature-object says

in GDAL it is more consistent to see the style as a property, just the same way the geometry of a feature is also a property.

So that must mean that there ought to be a ogrinfo -style option, just like there is -geom.

@jratike80
Copy link
Collaborator

It seems to be true that "Style" is reported always if it exists in the source data and GDAL knows something about how to interpret it. It is not possible to disable that. The opposite is possible. If Style is found it can be selected as a special field ORG_STYLES

ogrinfo -sql "select OGR_STYLE from test" test.jml
OGRFeature(style):0
  OGR_STYLE (String) = BRUSH(fc:#0000BD)
  Style = BRUSH(fc:#0000BD)

As documented, only a handful of drivers support styles

The following GDAL vector drivers have varying levels of support for feature styles: DWG (libopencad), DWG (Teigha), DXF, KML (libkml), MapInfo, MicroStation DGN v7 and DGN v8, OpenJUMP JML and PDF.

I would say that the wish is not of the highest priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants