[gdal-dev] 3D TIN support in WKBs

Gergely Czuczy gergely.czuczy at harmless.hu
Fri Mar 13 23:17:04 PDT 2015


On 14/03/2015 05:35, Even Rouault wrote:
> Selon Gergely Czuczy <gergely.czuczy at harmless.hu>:
>
>> Hello,
>>
>> I would like to ask whether there's any support for reading 3D TIN data
>> from WKBs, and if so, how can I do this?
>>
>> Currently when I try to read the following's WKB:
>> TIN Z (((512 -512 0,512 512 0,-512 -512 0,512 -512 0)),((512 512 0,512
>> -512 0,-512 -512 0,512 512 0)))
>> I get the error message:
>> ERROR 6: Unsupported WKB type 1016
>> ERROR 3: OGR Error: Unsupported geometry type
>>
>> I would like to read TINZ data from PostGIS into C++ and Python
>> programs, however there doesn't seem to be many libraries that support this.
>>
>> So, how can I read such 3D TINs using GDAL?
> Gergely,
>
> There's no support in GDAL for TIN. If you would want to implement it, you could
> take inspiration of what has been done recently to support curve geometries.
> Reading http://trac.osgeo.org/gdal/wiki/rfc49_curve_geometries should direct you
> at the places to modify.
>
> If you want to take a shorter route, you could just parse the WKB/WKT returned
> by PostGIS at your application side.
>
> Even
Thank you for your reply. To be honest I would like to focus on my pet 
project, and probably you could find better people with 3D/graphics 
coding experience than me. That's one of the reasons why I am looking 
for some library to do the heavy lifting instead of me.

Could you please give me some pointers on how to parse a WKB/WKT? 
Especially the float representation in the WKB I'm interested in. I 
think I will try to parse it myself.

After that, if I parse it manually, can I construct a gdal object out of 
it for manipulation, and at the end export it again to one or more TINZs 
for propagating it back into postgis?

Gergely


More information about the gdal-dev mailing list