naturalatlas / node-gdal

Node.js bindings for GDAL (Geospatial Data Abstraction Library)
http://naturalatlas.github.io/node-gdal/classes/gdal.html
Apache License 2.0
566 stars 124 forks source link

How to add a field with OGRFieldSubType #231

Open taylorendicott opened 6 years ago

taylorendicott commented 6 years ago

Just wondering if gdal.FieldDefn supports assigning a sub-field type. I have been unable to find any examples online. I want to add a boolean field. It appears that I need to create an OFTInteger field and assign an OFSTBoolean subtype. Is this possible using node-gdal? Thanks

outputLayer.fields.add(new gdal.FieldDefn(outFieldName, gdal.OFTInteger // <-- boolean?))
juneidy commented 1 month ago

https://github.com/juneidy/node-gdal-next/commit/84d3c613624d2a7ed0b922f3316ae2caf36a0fa6

@taylorendicott If you happen to still looking to use OGR Field Sub Type in node-gdal, feel free to take that change.