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

BGT 3DFier #122

Open
Pixelstudio opened this issue Jan 14, 2021 · 3 comments
Open

BGT 3DFier #122

Pixelstudio opened this issue Jan 14, 2021 · 3 comments

Comments

@Pixelstudio
Copy link

Hello,

Iv been using 3D fier for a while (and i liked it allot). usually with the same workflow.
Download BGT
Process BGT to generate gpkg file
Download AHN3
Adjust config.yml to point to the new file
Run 3D Fier.

It does not seem to work anymore, im wondering if anyone can confirm this.
My best guess is the gml from the bgt services is changed and 3D fier isn't working anymore......

There are a couple of problems

1) with BGT processing
lots of these errors:

ogr2ogr -nlt CONVERT_TO_LINEAR -where "eindregistratie is NULL" --config GML_GFS_TEMPLATE bgt_begroeidterreindeel.gfs -f GPKG bgt_begroeidterreindeel.gpkg bgt_begroeidterreindeel.gml
FAILURE:
Unable to open datasource bgt_begroeidterreindeel.gml' with the following drivers. -> JP2ECW'
-> OCI' -> SOSI'
-> PCIDSK' -> netCDF'
-> `PDS4'
.... this list continues

2) when running 3D fier (tried with version 1.3.0 and an older version like 1.2.
it starts processing but for some reason it stops without an error:
Config file is valid.
Reading input dataset: bgt/bgt_waterdeel.gpkg
Layer: Waterdeel
(270 features --> Water)
Reading input dataset: bgt/bgt_ondersteunendwaterdeel.gpkg
Layer: OndersteunendWaterdeel
(102 features --> Water)
Reading input dataset: bgt/bgt_onbegroeidterreindeel.gpkg
Layer: OnbegroeidTerreindeel
(123 features --> Terrain)

@hugoledoux
Copy link
Member

It seems your ogr2ogr is broken or the new version of the BGT is not how it was (possible), which causes a faulty input to 3dfier.

Make sure the first step is outputting valid files first.

@Pixelstudio
Copy link
Author

Hi,

The problem is indeed in the processing of the BGT data.
If i remove the template from the ogr2ogr command the conversion seems te work 👍
"--config GML_GFS_TEMPLATE bgt_wegdeel.gfs"
after that 3D fier runs fine, output seems to be good to, two questions:

1) why is there and gfs template ?

2) below is a small test case, no idea why this is not working, i did the same for another file bgt_ondersteunendWegdeel (gml and gfs) that seemed to work.

To isolate the problem i've made a test case which i can't seem to get working.
I removed all properties of the gfs template and the gml (dunno if that is possible), also remove all features but one.

this always results in:
FAILURE:
Unable to open datasource bgt_wegdeel.gml' with the following drivers. -> JP2ECW'
-> OCI' -> SOSI'
... list continues

conversion command:
ogr2ogr --config GML_GFS_TEMPLATE bgt_wegdeel.gfs -nlt CONVERT_TO_LINEAR -f GPKG bgt_wegdeel.gpkg bgt_wegdeel.gml

edited gfs template bgt_wegdeel.gfs:
<GMLFeatureClassList> <GMLFeatureClass> <Name>Wegdeel</Name> <ElementPath>Wegdeel</ElementPath> <!-- beginning of additions --> <GeomPropertyDefn> <Name>geometrie2d</Name> <ElementPath>geometrie2d</ElementPath> <!--CURVEPOLYGON--> <GeometryType>10</GeometryType> </GeomPropertyDefn> <SRSName>urn:ogc:def:crs:EPSG::28992</SRSName> <!-- end of additions --> </GMLFeatureClass> </GMLFeatureClassList>

bgt_wegdeel.gml:
<?xml version="1.0" encoding="UTF-8"?> <gml:FeatureCollection xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:imgeo-s="http://www.geostandaarden.nl/imgeo/2.1/simple/gml31" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.geostandaarden.nl/imgeo/2.1/simple/gml31 imgeo-simple-2.1-gml31.xsd http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"> <gml:featureMember> <imgeo-s:Wegdeel gml:id="bde52faa6-1f9e-2686-65b0-cfda277f4ac5"> <imgeo-s:geometrie2d> <gml:Polygon xmlns:gml="http://www.opengis.net/gml"> <gml:exterior> <gml:LinearRing> <gml:posList >266067.821 474415.804 266071.166 474424.841 266068.722 474423.838 266066.667 474418.261 266067.821 474415.804</gml:posList> </gml:LinearRing> </gml:exterior> </gml:Polygon> </imgeo-s:geometrie2d> </imgeo-s:Wegdeel> </gml:featureMember> </gml:FeatureCollection>

@hugoledoux
Copy link
Member

I don't know, my ex-colleague @tcommandeur did this, perhaps he can help?

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

2 participants