-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
OGR LVBAG Driver: addressable objects conversions should follow XSD #3221
Comments
@yorickdewid thanks for answers. Indeed this issue is rather broad, I count 4 sub-issues:
As indicated I will open new issues for points 2. and 3. here. Ad 1) There are quite some occurrences where a single VBO belongs to more than one PND. The XSD contains the relation (to PND) only in the VBO Object def. PND does not contain any ref to VBO. In BAG v1 PostGIS table made with NLExtract I found 20771 occurrences (where VBO belongs to more than one PND) via this query:
I took one VBO id, that should belong to 3 PNDs: VBO id = Other VBO id's are Not sure what best solution is. ad 4) ok, though we may loose information. Not sure why that design decision was taken. |
Ad 1) See also this discussion (with answer from Kadaster-BAG), though in Dutch: |
See #3417. This wil be part of GDAL 3.2.2. Field gebruiksdoel can containt multiple values
Datasource LIG STA VBO can have an optional secondary address
/offtopic; please check https://gdal.org/drivers/vector/lvbag.html to see if anything is missing. |
Thanks @yorickdewid ! Think the implementation for 1) could be similar to |
In following of #3417
|
@yorickdewid great for Are you willing to also make this construct i.e. The XSD construct in
The annotation is wrong here, should read: Een verblijfsobject maakt onderdeel uit van een of meer panden. As for testdata the VBO |
Anymore of these? |
@yorickdewid Not that I know for now. There are 3 such multiplicity-cases ( |
Now that |
Yes! |
"Addressable objects" within the BAG are Object Types that have (one or more) addresses.
Three types Verblijfsobject (VBO, hard to translate: "Living-unit", "Apartment"), Ligplaats (LIG, on water, mainly for living boats), Standplaats (STA, on land, like camp-ground). Will use these abbrevs below, and PND for Pand (Building).
These objects are defined within an XSD, see
imbag/IMBAGLV/objecten/v20200601/IMBAGLV_Objecten-2.1.0.xsd
(attached here). Several design decisions there are not very obvious, but should still be addressed in the LVBAG Driver. Will expand below for each issue. Most have to do with "multiplicity".It may help to look at the Python object definitions in NLExtract BAG v1 and the BAG Postgres tables.
Expected behavior and actual behavior.
N-M Relation PND-VBO
A VBO is usually N:1 to a PND Building, i.e. a PND contains (
maaktDeelUitVan
/"Is-part-of") one or more VBOs. But there are also cases where a VBO belongs to more than 1 PND. Hence the relation PND-VBO in the XSD is N-M. This should be reflected in the LVBAG output.Currently only one PND related to a VBO is assumed.
The relevant XSD excerpt:
Within NLExtract this was solved by generating a relation-table ("tussentabel")
verblijfsobjectpand
that enumerates all PND-VBO relations.LVBAG could do something similar like generating a PND-VBO object. This object should also contain the VBO
voorkomen
attributes. Generating an identifier arrayStringList
(preferred) or comma-separated formaaktDeelUitVan
would also be possible and more compact.One or more "usage-purposes" ("gebruiksdoelen") VBO
The relevant XSD excerpt:
Within NLExtract this was solved by generating a relation-table ("tussentabel")
verblijfsobjectgebruiksdoel
.But LVBAG could also solve this more compact by generating a comma-separated list as a string.
Or more formally a string array type
StringList
(preferred).ogr2ogr
can expand to comma-separated if needed with-fieldTypeToString StringList
.VBO handle sub-addresses
XSD excerpt:
A VBO, STA, LIG ("addresseerbaarobject") always has only one main address (
heeftAlsHoofdadres
) and zero or more sub-adresses (heeftAlsNevenadres
).In NLExtract BAG v1 a
nevenadres
object was generated for each occurrence with this definition:identificatie
refers to the main VBO address,nevenadres
. But this solution is maybe too complex.Not sure why that was done.
Like with the other multiplicities a string array type
StringList
ofnevenadres
identifiers (referring to Nummeraanduiding objects) could be generated.VBO Geometry may be POINT or POLYGON
Relevant XSD excerpt:
with
In NLExtract BAG v1 this was solved by generating two fields
POINT geopunt
andPOLYGON geovlak
. This is my preferred solution. Defining a single multi-typed geom field asGEOMETRY
also has issues.Operating system
Any
GDAL version and provenance
GDAL 3.2.0, released 2020/10/26
IMBAGLV_Objecten-2.1.0.xsd.txt
The text was updated successfully, but these errors were encountered: