Question

Arc by Bulg (dwg) to Arc by 3 Points (gpkg)

  • 11 September 2018
  • 8 replies
  • 3 views

Badge +3

Hi all

I searched the Knowledge Center, but I didn’t found a solution (maybe I overlooked something).

 

I have an AutoCAD drawing with polylines containing arc and line segments and I want to write this polylines to a GeoPackage database.

 

The geometry of the gpkg feature class is »line (CompoundCurve)«.

When I write the polylines to the database I don’t get arcs but only line segments. (refer to attached picture).

 

Is there a solution to write the data with lines and arcs in the database?

I get the correct feature, when I’m writing »interlis« data to the GP database .


8 replies

Userlevel 4

Unfortunately FME doesn't currently support writing arcs to the GeoPackage format, see the quick facts page in the help:

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/geopackage/quick_facts_geopackage.htm

Badge +3

I didn’t read this part of the documentation, because I tested the GeoPackage with an interlis dataset before.

 

It seems a little bit strange, because the »itf - arcs« were written as »Arcs by 3 Point« (refer to the attachment).

I’ll test the same datasets with a PostGIS feature class (geometry CompoundCurve)...

20180912-question-dwg-interlis-arc-to-gpkg-arc.png

Userlevel 4

I didn’t read this part of the documentation, because I tested the GeoPackage with an interlis dataset before.

 

It seems a little bit strange, because the »itf - arcs« were written as »Arcs by 3 Point« (refer to the attachment).

I’ll test the same datasets with a PostGIS feature class (geometry CompoundCurve)...

20180912-question-dwg-interlis-arc-to-gpkg-arc.png

That's interesting! It could be that the documentation isn't quite up to date... Consider contacting Safe support for that one.

 

Badge +2

I didn’t read this part of the documentation, because I tested the GeoPackage with an interlis dataset before.

 

It seems a little bit strange, because the »itf - arcs« were written as »Arcs by 3 Point« (refer to the attachment).

I’ll test the same datasets with a PostGIS feature class (geometry CompoundCurve)...

20180912-question-dwg-interlis-arc-to-gpkg-arc.png

Thanks @habbu and @david_r. It does seem like the doc needs some updates. I'll let the team know.

 

Regarding why the dwg to Geopackage translation didn't preserve the arcs, we might need some more detail about the workflow. @habbu would you be able to share some sample dwg data and the workspace you used for the conversion?
Badge

Hi @habbu,

Is it possible to share a sample of your data (ideally both input and output)? FME should support writing arc-by-bulge to GeoPackage since version 2017.1

I would have two main theories about why we would be converting to lines:

  • We may be writing to a GeoPackage that was not created by FME, and the geometry type of the existing table does not support compound curves. If you use a SQLite3 Non-Spatial Reader on the GeoPackage and read all of the data in the "
    gpkg_geometry_columns
    " table, then we should be able to tell.
  • There may be a transformer in your workflow that is converting arcs to lines before they get to the GeoPackage Writer. If you use a Logger just before the GeoPackage Writer, then we should be able to tell.
Badge +3

Hi @XiaomengAtSafe

 

Hi @jakemolnar

Thanks for your reply.

You'll find the dwg, the workspace and the geopackage attached.

20180914-datatosafe.zip

Badge +2

Hi @XiaomengAtSafe

 

Hi @jakemolnar

Thanks for your reply.

You'll find the dwg, the workspace and the geopackage attached.

20180914-datatosafe.zip

Hi @habbu, Jake has found the problem to be related to a reprojection that was performed on the writer, due to the coordinate system the input data was in. This will be fixed in a future version, and we will keep you updated.

 

In the mean time, you can check out the attached workspace for a workaround. It split out the segments that are circular arcs, and perform a reprojection on the stroked line, before turning it back to an arc again, and re-building the path. 20180914-bauldxf-to-baulgeopackage.fmw

 

(My version of FME is a 2017.1 version that's slightly newer than yours. But it should work in your version too) Please let me know if you have any questions about the workaround.

 

Badge +3

Hi @XiaomengAtSafe

 

Hi @jakemolnar

Thanks for your reply.

You'll find the dwg, the workspace and the geopackage attached.

20180914-datatosafe.zip

Hi all

 

thanks for your quick support and for providing me with that solution.

 

I tested the workaround and get the right output.

 

Therefore I can edit / modify the data attributes in the GeoPackage and write out the data (with FME ) to the desired Interlis data.

 

 

 

Reply