WKT Local projection equivalent

I am trying to use gdal to design some basic shapes from a number of local coordinate systems. These coordinate systems are supported by ArcGIS, but I end up just forcing them to use gdal (and proj4) to convert these geometries to a base lat / long (EPSG: 4326). This is what gdalsrsinfo returns:

PROJCS["mylocalgrid",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Local"],PARAMETER["False_Easting",20289.634],PARAMETER["False_Northing",14781.765],PARAMETER["Scale_Factor",1.000179],PARAMETER["Azimuth",0.0],PARAMETER["Longitude_Of_Center",-109.675257803],PARAMETER["Latitude_Of_Center",32.9599048 58],UNIT["Foot_US",0.3048006096012192]]

      

If I try to use ogr to translate the dot shape file, I get the following error:

ERROR 6: No translation for Local to PROJ.4 format is known.
Failed to create coordinate transformation between the
following coordinate systems.  This may be because they
are not transformable, or because projection services
(PROJ.4 DLL/.so) could not be loaded.
Source:

      

Does proj4 support local coordinate systems? Any guess what I should be using for the PROJECTION parameter?

Thank.

+3


source to share


1 answer


Looking at the ArcGIS documentation for Local Cartesian Projection , he says, "This map projection is the same as Orthographic ." So for the parameter, PROJECTION

replace "Local"

with "Orthographic"

and it should work. Here's a snippet in Python to show you what's going on:

from osgeo import osr
p = osr.SpatialReference()
p.ImportFromWkt('PROJCS["mylocalgrid",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Orthographic"],PARAMETER["False_Easting",20289.634],PARAMETER["False_Northing",14781.765],PARAMETER["Scale_Factor",1.000179],PARAMETER["Azimuth",0.0],PARAMETER["Longitude_Of_Center",-109.675257803],PARAMETER["Latitude_Of_Center",32.9599048 58],UNIT["Foot_US",0.3048006096012192]]')
print(p.ExportToProj4())

      

Shows line PROJ.4:



+proj=ortho +lat_0=32.959904858 +lon_0=-109.675257803 +x_0=6184.292811785623 +y_0=4505.490982981965 +ellps=WGS84 +units=us-ft +no_defs 

      

Of course, it would be nice to test it to see if it works.

+3


source







All Articles