Riverscapes / riverscapes-tools

Open-source Python 3.0 tools for the Riverscapes organization
https://tools.riverscapes.net/
GNU General Public License v3.0
10 stars 8 forks source link

Anthro and RCAT geometry type warnings #991

Open philipbaileynar opened 3 weeks ago

philipbaileynar commented 3 weeks ago

Reviewing this Anthro project I notice that there are some geometry type warnings that should be easy to fix. Looks like some single geoemetries just need to be packaged as multipart geometries.

Screenshot 2024-08-20 at 1 17 11 PM
2024-08-20 18:50:32,555 WARNING  [GDALError      ] ERR# 1 -- A geometry of type POINT is inserted into layer IGOGeometry of geometry type MULTIPOINT, which is not normally allowed by the GeoPackage specification, but the driver will however do it. To create a conformant GeoPackage, if using ogr2ogr, the -nlt option can be used to override the layer geometry type. This warning will no longer be emitted for this combination of layer and feature geometry type.
2024-08-20 18:50:35,231 INFO     [Processing points] Completed 10,801 operations.  Total Time: 2.0 seconds     

2024-08-20 18:50:35,442 INFO     [Copy Features  ] Copying features from flowlines with specified attributes into project
2024-08-20 18:50:35,462 WARNING  [GDALError      ] ERR# 1 -- A geometry of type LINESTRING is inserted into layer ReachGeometry of geometry type MULTILINESTRING, which is not normally allowed by the GeoPackage specification, but the driver will however do it. To create a conformant GeoPackage, if using ogr2ogr, the -nlt option can be used to override the layer geometry type. This warning will no longer be emitted for this combination of layer and feature geometry type.
2024-08-20 18:50:42,129 INFO     [Processing points] Completed 6,988 operations.  Total Time: 6.0 seconds     
philipbaileynar commented 3 weeks ago

RCAT has several of these warnings too.

FWIW Postgres has a helpful method called "MakeMultiPart" that performs the conversion for you. Perhaps OGR has something similar?

Screenshot 2024-08-20 at 1 41 04 PM
jtgilbert commented 3 weeks ago

From some brief research on this, I think it's beyond what we want to deal with for running the tools right now.