[gdal-dev] Non-EPSG projections, esri_extra.wkt and best practices

Jorge Arévalo jorgearevalo at libregis.org
Mon Jun 3 08:41:22 PDT 2013


Hello,  

Thanks for your response, Tyler. Let me provide a little more context.

The app have 2 parts: Java part and C++ part, calling GDAL. The connection is made via JNI. The Java part provides a string like ESRI:54030 to the C++ part. The C++ part call gdalwarp with that string, and it fails.  

I could try to change the Java part to provide the PROJ string, like you suggested, but it's a really complex desktop application. That would imply to change a lot of Java code, and a previous understanding of the whole architecture. I'm just trying to save time, changing only the C++ part, much easier.

I like the idea about append the ESRI definitions to the end of the EPSG main file. So, I guess than, in that situation, I should just replace the "ESRI" part in the string with "EPSG", right?  

--  
Jorge Arevalo
Freelance developer

http://www.krop.com/jorgearevalo
http://about.me/jorgeas80

Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)


El lunes 3 de junio de 2013 a las 17:29, Tyler Mitchell escribió:

> Jorge, are you able to just provide the full PROJ syntax instead?
> +proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  
> Aside from that, you can just copy/append the ESRI definitions to the end of the EPSG main file and GDAL should pick it up.
>  
> Tyler
>  
> On 2013-06-03, at 8:00 AM, Jorge Arévalo wrote:
> > Hello,  
> >  
> > Let say I want to warp this raster file https://dl.dropboxusercontent.com/u/6599273/gis_data/utm.tif
> >  
> > From its original projection, EPSG:26711, to Robinson projection, not part of EPSG. So, I need to provide the correct frame of reference, and GDAL will be able to do it.  
> >  
> > I could download the OGC WKT definition from http://spatialreference.org/ref/esri/54030/ogcwkt/, and pass the downloaded file to gdalwarp, like:
> >  
> > gdalwarp -s_srs epsg:26711 -t_srs robinson_file.wkt utm.tif utm_warped.tif
> >  
> > The thing is I'm working with an app that uses GDAL to warp raster files. The information this app handles (and it's hard to change) related with non EPSG projections is something like ESRI:54030. I know this is something that GDAL doesn't accept. But I see, in GDAL_DATA directory, a file named esri_extra.wkt. This file contains a line like this:
> >  
> > 54030,PROJCS["World_Robinson",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Robinson"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1],AUTHORITY["EPSG","54030"]]
> >  
> > This is the number of the ESRI projection followed by the WKT definition. So, my question is: Is there any "right" mechanism, maybe provided by GDAL, to make the warping operation? Something that gets ESRI:54030 as input, looks in this file (or where needed) and gets the wkt definition as output, that can be safely used with gdalwarp.
> >  
> > Many thanks in advance,  
> >  
> > --  
> > Jorge Arevalo
> > Freelance developer
> >  
> > http://www.krop.com/jorgearevalo
> > http://about.me/jorgeas80
> >  
> > Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)
> >  
> >  
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org (mailto:gdal-dev at lists.osgeo.org)
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  
>  
>  
>  
> Tyler Mitchell
> Engineering Director  
> Actian Corporation
> tyler.mitchell at actian.com (mailto:tyler.mitchell at actian.com)
>  
> MOBILE 250-303-1831
> SKYPE spatialguru
> www.actian.com
> (http://www.actian.com/)  





More information about the gdal-dev mailing list