1

I am trying to transform the SVY21 coordinates I have to the WGS84 coordinate system.

I tried using the GDAL software and pasted the following into command after installing: ogr2ogr -f GeoJSON –t_srs WGS84 <jsonFileName>.json <shapefile>.shp

It results in the failure:

Unable to open datasource 'WGS84' with the following drivers

And the drivers are listed.

Also I tried to use the python utm package to convert the N48 utm coordinate to WGS48, but I did not manage to convert the SVY21 coordinates to the N48 utm reference point.

I found the proposed solution in this old post confusing in terms of terminology and I would prefer using some existing solution.

Is there a "easy" solution that makes use of my previous approaches or is quickly applicable to my problem? I would also be happy if someone could provide me with a more precise explanation of the approach featured in the older post.

Thanks in advance.

Edit: I tried writing a python script that implements the vicenty direct calculation from the "old post" mentioned before. It would also help, if someone could confirm that substracting the False Coordinates of Projection Origin (28001.642mE,38744.572mN) from the raw svy21 (e,n) and using the Projection Origin (Unmarked point) (103° 50' 00", 1° 22' 00") is correct.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
MNue
  • 13
  • 5
  • Can you post the exact ogr2ogr command you use? I think you have syntax that is different from what you posted. The error says you are trying to open a dataset called "WGS84", but the command you posted is not attempting to do that. – Logan Byers Oct 26 '16 at 12:39
  • I uploaded a screenshot of [my command](http://picpaste.com/pics/gdal-vgctZpV3.1477494519.png). I don't really see a difference. – MNue Oct 26 '16 at 15:10
  • Are you certain there is a space between the .json and the .shp files? – Logan Byers Oct 26 '16 at 16:20
  • "...filename1.jsonxfilename2.shp" In the command there is a space where the x is in that fraction of it. – MNue Oct 26 '16 at 16:24

1 Answers1

0

I was compiling gdal by hand and I could use the following command to do what you wanted:

  1. You have to copy the *.shp (and *.shx) files beside the ogr2ogr-command (Source: https://gis.stackexchange.com/questions/56652/how-to-move-and-open-shapefiles-with-ogr2ogr)

  2. gdal does not immediately know "EPSG:3414" - the EPSG name for SCY21, so give it a hint, this is in the [INSTALL LOCATION]/data (i dont know where it is on an installed version, especially not on windows. Search for a file called "gcs.csv", and point GDAL_LOCATION to the containing folder.

  3. define t_srs and s_srs eccordingly

  4. Define the output format ("GEOJson")

Summa summarum:

GDAL_DATA="../data" ./ogr2ogr -f "GEOJson" "LaneMarking_wgs84.json" "LaneMarking.shp" -t_srs WGS84 -s_srs "EPSG:3414"

Have fun :)

Community
  • 1
  • 1
EGOrecords
  • 1,959
  • 2
  • 19
  • 33