0

I use las2tin to generate tin(in .shp format) for a las.

las2tin64.exe -i input.las -o tin.shp

Then I use shp2pgsql to create a sql with this shape file:

shp2pgsql -s 4326 tin.shp temp_table > tin.sql

But this gives me error:

Unknown geometry type: 31

How can I debug this issue?

PS:

This worked for me:

First, use ogr2ogr utility(comes packed with postgis) to generate intermediate las containing geometry compatible with postgis

ogr2ogr -f "ESRI Shapefile" -nlt POLYGONZ -explodecollections output.shp input.shp

Then run shp2pgsql with this shp file:

shp2pgsql -s -I output.shp temp_table > tin.sql

3
  • 1
    maybe try yo use a GIS tool like QGIS to convert your TIN to a supported format (like multipolygons)? Commented Jun 17 at 9:13
  • Did you Google the error? Commented Jun 17 at 18:26
  • Yes, I did. But couldn't find the relevant results. Commented Jun 18 at 1:45

1 Answer 1

0

las2tin generates SHP files with MultiPatch polygons (Type 31). It seems shp2pgsql does not support this kind of polygons.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.