[gdal-dev] ogr2ogr and nlt question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] ogr2ogr and nlt question

Andreas Neumann-4

Hi,

when using ogr2ogr I can fix the geometry type for cases where I use SQL statements.

Can I use nlt multiple times? In my case I would like to specify -nlt CONVERT_TO_LINEAR to convert from CompounCurve to Polygon and then use -nlt POLYGON to tell it you are really a POLYGON. Is this possible to use the -nlt parameter twice?

Thank you for your reply,

Andreas


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr and nlt question

Andreas Neumann-4

sorry - I meant to say that I convert CURVEPOLYGON to POLYGON, not COMPOUNDCURVE TO POLYGON.

Andreas

On 2017-09-29 08:32, Andreas Neumann wrote:

Hi,

when using ogr2ogr I can fix the geometry type for cases where I use SQL statements.

Can I use nlt multiple times? In my case I would like to specify -nlt CONVERT_TO_LINEAR to convert from CompounCurve to Polygon and then use -nlt POLYGON to tell it you are really a POLYGON. Is this possible to use the -nlt parameter twice?

Thank you for your reply,

Andreas


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr and nlt question

Andreas Neumann-4
In reply to this post by Andreas Neumann-4

answering myself: apparently ogr2ogr accepts two -nlt parameters and the result looks ok (correct type and correctly segmentized from the original CURVEPOLYGON).

So all good in this respect.

Andreas

On 2017-09-29 08:32, Andreas Neumann wrote:

Hi,

when using ogr2ogr I can fix the geometry type for cases where I use SQL statements.

Can I use nlt multiple times? In my case I would like to specify -nlt CONVERT_TO_LINEAR to convert from CompounCurve to Polygon and then use -nlt POLYGON to tell it you are really a POLYGON. Is this possible to use the -nlt parameter twice?

Thank you for your reply,

Andreas


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr and nlt question

Even Rouault-2
In reply to this post by Andreas Neumann-4

Hi Andreas,

> when using ogr2ogr I can fix the geometry type for cases where I use SQL

> statements.

>

> Can I use nlt multiple times?

 

No, only one will be taken into account (likely the last one, but I'd say this is unspecified behaviour)

 

> In my case I would like to specify -nlt

> CONVERT_TO_LINEAR to convert from CompounCurve to Polygon and then use

> -nlt POLYGON to tell it you are really a POLYGON. Is this possible to

> use the -nlt parameter twice?

 

You just need to use -nlt POLYGON. This will both force each feature geometry to Polygon (doing linear approximation if needed) and declare the layer type as Polygon

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev