Skip to main content
Question

DWG to GeoJSON

  • 26 July 2024
  • 1 reply
  • 18 views

Hi,

 

Just was hoping for tips on Converting DWG to GeoJSON - is there any one who can lend an explanation I’m attempting the below and it’d be great if someone could offer a high level understanding / approach.

 

 

1 reply

Userlevel 2
Badge +3

Hi @jp12212,

Thank you for posting! 

Looking at the image attached I can understand some confusion you’re working through.
A quick explanation on why they workbench may not work.

The GeoJsonExtractor transformer is designed to extract GeoJSON data from attributes. It typically requires GeoJSON data to be already present in an attribute, but it appears to be connected directly to the output of the CoordinateSystemSetter, which usually handles geometries, not attributes. (JSONExtractor

The JSONFragmenter transformer is used to fragment JSON objects from an attribute. Similar to the GeoJsonExtractor, it expects JSON-formatted text in an attribute but is connected to the output of the GeoJsonExtractor, which should produce geometry.
 

The GeometryReplacer transformer is used to replace existing geometry with new geometry specified in an attribute. Since the JSONFragmenter is typically used for handling JSON data, this might not work as expected if the input to the GeometryReplacer is not in the correct format.

To properly convert DWG to GeoJSON, you should use the appropriate transformers for handling and writing geometric data directly to GeoJSON.

Reader (DWG) > CoordinateSystemSetter > GeoJSON Writer.

If you still have issues - do not hesitate to reach out again and we will help to find a solution. 

Thank you,
Donal. 

Reply