Question

convert dxf file to geojson using proj4/projcs coordinate system (not EPSG) (PS: my proj4 contains this parameter towgs84)

  • 21 April 2021
  • 1 reply
  • 11 views

I am trying to convert DXF file to Geojson using the same proj4 as a source and destination coordinate system.

tried to :

1) use 'define a new custom coordinate system' suggested solution, not working because my proj4 coordinate system includes this parameter: +towgs84 which is not in the coordinate system parameters

2) use 'proreprojector' transform, failed because the source and the destination coordinate systems are equals.

I need to use this workspace as a dynamic one, which means that the reader/writer types may be different.

Any suggestion to achieve this task?


1 reply

Userlevel 2
Badge +17

Hi @mouenr​ ,

The latest specifications for GeoJSON mandate that all output be in WGS84 lat/long, but FME does give you the option to output in other coordinate systems, using the obsolete CRS definition.

 

To output a WGS84 dataset, please use the PROJReprojector to reproject your data from the source PROJ coordinate system to EPSG:4326. You don't need to create a custom definition for your source coordinate system - you can just paste your PROJ coordinate system string into the Source Coordinate System box of the PROJReprojector.

 

To output an obsolete GeoJSON with your coordinate system, you will need to find an equivalent EPSG code for it. Add a CoordinateSystemSetter to your workspace right before the output feature type, then set the coordinate system to that EPSG code, in the form EPSG:#####. You will also need to set the GeoJSON writer parameter 'Reproject to WGS84' to No.

Reply