tudelft3d / 3dfier

The open-source tool for creating 3D models
http://tudelft3d.github.io/3dfier
GNU General Public License v3.0
526 stars 106 forks source link

BGT 3DFier #122

Open Pixelstudio opened 3 years ago

Pixelstudio commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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: `

Wegdeel Wegdeel geometrie2d geometrie2d 10 urn:ogc:def:crs:EPSG::28992

`

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">

266067.821 474415.804 266071.166 474424.841 266068.722 474423.838 266066.667 474418.261 266067.821 474415.804 `
hugoledoux commented 3 years ago

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