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

LVBAG driver skips features #11354

Open
01000011-01000010 opened this issue Nov 25, 2024 · 4 comments
Open

LVBAG driver skips features #11354

01000011-01000010 opened this issue Nov 25, 2024 · 4 comments

Comments

@01000011-01000010
Copy link

What is the bug?

I use the LVBAG driver for ogrinfo to get the feature count, and for ogr2ogr to import files into PostgreSQL. It seems to skip features, since the feature count results in 0, even through there are features inside (when compared with xmlstarlet).

Driver: https://gdal.org/en/latest/drivers/vector/lvbag.html
The entire dataset can be downloaded here: https://service.pdok.nl/lv/bag/atom/downloads/lvbag-extract-nl.zip

Steps to reproduce the issue

9999InOnderzoek08112024/9999IOLIG08112024/9999IOLIG08112024-000001.xml

ogrinfo -ro -al -so "9999InOnderzoek08112024/9999IOLIG08112024/9999IOLIG08112024-000001.xml" | grep Feature
Feature Count: 0

xmlstarlet select -t -v "count(//sl:stand)" -n "9999InOnderzoek08112024/9999IOLIG08112024/9999IOLIG08112024-000001.xml"
4173

9999InOnderzoek08112024/9999IONUM08112024/9999IONUM08112024-000001.xml

ogrinfo -ro -al -so "9999InOnderzoek08112024/9999IONUM08112024/9999IONUM08112024-000001.xml" | grep Feature
Feature Count: 0

xmlstarlet select -t -v "count(//sl:stand)" -n "9999InOnderzoek08112024/9999IONUM08112024/9999IONUM08112024-000001.xml"
10000

9999InOnderzoek08112024/9999IOPND08112024/9999IOPND08112024-000001.xml

ogrinfo -ro -al -so "9999InOnderzoek08112024/9999IOPND08112024/9999IOPND08112024-000001.xml" | grep Feature
Feature Count: 0

xmlstarlet select -t -v "count(//sl:stand)" -n "9999InOnderzoek08112024/9999IOPND08112024/9999IOPND08112024-000001.xml"
10000

9999InOnderzoek08112024/9999IOVBO08112024/9999IOVBO08112024-000001.xml

ogrinfo -ro -al -so "9999InOnderzoek08112024/9999IOVBO08112024/9999IOVBO08112024-000001.xml" | grep Feature
Feature Count: 0

xmlstarlet select -t -v "count(//sl:stand)" -n "9999InOnderzoek08112024/9999IOVBO08112024/9999IOVBO08112024-000001.xml"
10000

As you can see, there are features inside but ogrinfo results in Feature Count: 0
I've attached the mentioned XML files to this issue.

Versions and provenance

GDAL 3.8.4, released 2024/02/08
Installed on Ubuntu using apt install gdal-bin on Ubuntu 24.04.1 LTS

Additional context

Mentioned XML files in ZIP-file: bugreport.zip

@01000011-01000010
Copy link
Author

All information for 1 of the ogrinfo examples in my ticket:

ogrinfo -ro -al -so "9999InOnderzoek08112024/9999IOLIG08112024/9999IOLIG08112024-000001.xml"
INFO: Open of `9999InOnderzoek08112024/9999IOLIG08112024/9999IOLIG08112024-000001.xml'
      using driver `LVBAG' successful.

Layer name: Ligplaats
Geometry: Polygon
Feature Count: 0
Layer SRS WKT:
PROJCRS["Amersfoort / RD New",
    BASEGEOGCRS["Amersfoort",
        DATUM["Amersfoort",
            ELLIPSOID["Bessel 1841",6377397.155,299.1528128,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4289]],
    CONVERSION["RD New",
        METHOD["Oblique Stereographic",
            ID["EPSG",9809]],
        PARAMETER["Latitude of natural origin",52.1561605555556,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",5.38763888888889,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9999079,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",155000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",463000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["easting (X)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["northing (Y)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["Engineering survey, topographic mapping."],
        AREA["Netherlands - onshore, including Waddenzee, Dutch Wadden Islands and 12-mile offshore coastal zone."],
        BBOX[50.75,3.2,53.7,7.22]],
    ID["EPSG",28992]]
Data axis to CRS axis mapping: 1,2
hoofdadresNummeraanduidingRef: String (0.0)
nevenadresNummeraanduidingRef: StringList (0.0)
identificatie: String (0.0)
status: String (0.0)
geconstateerd: Integer(Boolean) (0.0)
documentDatum: Date
documentNummer: String (0.0)
voorkomenIdentificatie: Integer (0.0)
beginGeldigheid: Date
eindGeldigheid: Date
tijdstipRegistratie: DateTime
eindRegistratie: DateTime
tijdstipInactief: DateTime
tijdstipRegistratieLV: DateTime
tijdstipEindRegistratieLV: DateTime
tijdstipInactiefLV: DateTime
tijdstipNietBagLV: DateTime
```

@rouault
Copy link
Member

rouault commented Nov 25, 2024

CC @yorickdewid

@yorickdewid
Copy link
Contributor

I'll have a look

@yorickdewid
Copy link
Contributor

yorickdewid commented Nov 25, 2024

@01000011-01000010 I'm not sure the "InOnderzoek" was ever supported. I can't remember if is was part of the original BAG dumps or not. I can confirm that the latest GDAL build does not list any features in theses files.

How much testing are you willing to do to figure out the differences between the 'active' and 'in onderzoek' dumps?

Edit
I think the KenmerkInOnderzoek XML schema is not parsed.

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

No branches or pull requests

3 participants