Skip to main content
naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

I am using GDAL and the ogr2ogr tool in order to convert a file from a dxfDXF to geojsonGeoJSON but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the dxfDXF or my command, or is there something wrong in the actual projection change?

I am using GDAL and the ogr2ogr tool in order to convert a file from a dxf to geojson but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the dxf or my command, or is there something wrong in the actual projection change?

I am using GDAL and the ogr2ogr tool in order to convert a file from a DXF to GeoJSON but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the DXF or my command, or is there something wrong in the actual projection change?

deleted 27 characters in body; edited tags
Source Link
TomazicM
  • 27k
  • 24
  • 31
  • 42

I am using GDAL and the ogr2ogr tool in order to convert a file from a dxf to geojson but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the dxf or my command, or is there something wrong in the actual projection change?

Thanks for answers!

I am using GDAL and the ogr2ogr tool in order to convert a file from a dxf to geojson but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the dxf or my command, or is there something wrong in the actual projection change?

Thanks for answers!

I am using GDAL and the ogr2ogr tool in order to convert a file from a dxf to geojson but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the dxf or my command, or is there something wrong in the actual projection change?

Source Link
Ms01
  • 103
  • 3

DXF to GeoJSON conversion gets coordinates completely wrong?

I am using GDAL and the ogr2ogr tool in order to convert a file from a dxf to geojson but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84.

The issue I am facing is that the coordinates gets very wacky when the projection is being changed.

I am using this command: ogr2ogr -f GeoJSON -s_srs EPSG:3006 -t_srs EPSG:4326 test1.geojson test1.dxf

All the coordinates is something like: geometry": { "type": "Point", "coordinates": [ 62.30984294549225, 3.52484086442923, 0.0 ] } when in reality the 3 should be 16-something and the first one isn't correct either.

What could be wrong here? I get that it isn't much to go on, but the files are pretty big and I've manually gone through some of the conversion of coordinates if I skip the projection change and that looks as expected.

Is there something wrong with the dxf or my command, or is there something wrong in the actual projection change?

Thanks for answers!