Skip to main content
Question

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

  • April 21, 2021
  • 1 reply
  • 59 views

mouenr
Contributor

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

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • April 21, 2021

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings