Skip to main content
Edited grammar and formatting
Source Link
Joseph
  • 76.3k
  • 7
  • 172
  • 286

I'm trying to convert closed polylines into polygons using ogr2ogr from dxf to mssql. Here itIt says that polylines are converted into POLYGON if they are closed, but I always get the type LINESTRING instead of POLYGON in the geometry type column. I also tried to convert DXF into Shapefile and into a MySQL database with same results. Converting Shapefiles with polygons into databases works well, so I think the problem is in the gdal dxf driver.

Can someone explain to me what am I am doing wrong?

Here is the command I'm running

ogr2ogr -update -append -f MSSQL "MSSQL:server=. \SQLEXPRESS;database=testdb;trusted_connection=yes" test.dxf

ogr2ogr -update -append -f MSSQL "MSSQL:server=.\SQLEXPRESS;database=testdb;trusted_connection=yes" test.dxf

I'm trying to convert closed polylines into polygons using ogr2ogr from dxf to mssql. Here it says that polylines are converted into POLYGON if they are closed, but I always get the type LINESTRING instead of POLYGON in the geometry type column. I also tried to convert DXF into Shapefile and into a MySQL database with same results. Converting Shapefiles with polygons into databases works well, so I think the problem is in the gdal dxf driver.

Can someone explain me what am I doing wrong?

Here is the command I'm running

ogr2ogr -update -append -f MSSQL "MSSQL:server=. \SQLEXPRESS;database=testdb;trusted_connection=yes" test.dxf

I'm trying to convert closed polylines into polygons using ogr2ogr from dxf to mssql. Here It says that polylines are converted into POLYGON if they are closed, but I always get the type LINESTRING instead of POLYGON in the geometry type column. I also tried to convert DXF into Shapefile and into a MySQL database with same results. Converting Shapefiles with polygons into databases works well, so I think the problem is in the gdal dxf driver.

Can someone explain to me what I am doing wrong?

Here is the command I'm running

ogr2ogr -update -append -f MSSQL "MSSQL:server=.\SQLEXPRESS;database=testdb;trusted_connection=yes" test.dxf
Source Link

OGR DXF Closed Polyline Conversion

I'm trying to convert closed polylines into polygons using ogr2ogr from dxf to mssql. Here it says that polylines are converted into POLYGON if they are closed, but I always get the type LINESTRING instead of POLYGON in the geometry type column. I also tried to convert DXF into Shapefile and into a MySQL database with same results. Converting Shapefiles with polygons into databases works well, so I think the problem is in the gdal dxf driver.

Can someone explain me what am I doing wrong?

Here is the command I'm running

ogr2ogr -update -append -f MSSQL "MSSQL:server=. \SQLEXPRESS;database=testdb;trusted_connection=yes" test.dxf