[gdal-dev] Urgent GDal failing to open a file.

Matt Wilkie matt.wilkie at gov.yk.ca
Tue Jun 24 13:56:42 EDT 2008


Hi Courtney,

Likely too late for your project, but this meagre script will copy a 
projection from one raster to another without needing to create a new file:
http://code.google.com/p/maphew/source/browse/trunk/gis/gdal_extras/bin/gdalcopyproj.py

for use with fwtools just plunk it into your fwtools/bin directory.

cheers,

matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------


Courtney Schitka wrote:
> And I was hoping for an easy solution with FWTools or something... 
> Thanks for the suggestions boys. Looks like I've got a long night a head 
> of me.
> 
> On Fri, Jun 20, 2008 at 6:51 PM, Martin Chapman <mchapman at texelinc.com 
> <mailto:mchapman at texelinc.com>> wrote:
> 
>     Yes, I would try Frank's suggestion first though.  If it doesn't
>     work then you could re-write the file and assign a projection with
>     create() or createCopy() on the driver object..
> 
>     Martin
> 
>     Sent via BlackBerry by AT&T
> 
>     -----Original Message-----
>     From: "Courtney Schitka" <c.schitka at gmail.com
>     <mailto:c.schitka at gmail.com>>
> 
>     Date: Fri, 20 Jun 2008 18:51:24
>     To:"Frank Warmerdam" <warmerdam at pobox.com <mailto:warmerdam at pobox.com>>
>     Cc:gdal-dev at lists.osgeo.org <mailto:Cc%3Agdal-dev at lists.osgeo.org>
>     Subject: Re: [gdal-dev] Urgent GDal failing to open a file.
> 
> 
>     Frank & Martian
> 
>     Thanks for your prompt replies.
> 
>     If I know the coordinate system the file is supposed to be, is there
>     a way I can inject that into the file it's self ? Without needing to
>     edit the code or setting the GDAL_DATA environment variable ? The
>     file is a GeoTiff ? I'd provide a sample but the file is 100+ M
>     could take a bit.
> 
>     Court
> 
> 
>     On Fri, Jun 20, 2008 at 6:46 PM, Frank Warmerdam
>     <warmerdam at pobox.com <mailto:warmerdam at pobox.com>
>     <mailto:warmerdam at pobox.com <mailto:warmerdam at pobox.com>> > wrote:
> 
> 
> 
>     Courtney Schitka wrote:
>      Good Day list.
> 
>      I write you with kind of an urgent problem today. The company I am
>     doing some consulting for is using GDAL to read a majority of their
>     data. They just purchased 800$ worth of some GeoData from a third
>     party company. Everytime we try an dopen the data through Gdal I
>     get. A problem with trying to create a Coordinate Transform. See error
> 
>      ERROR: No PROJ.4 translation for source SRS, coordinate
> 
>      When I did a Gdal Info on the file. I find this information out
> 
>      Coordinate System is:
>      PROJCS[,
>         GEOGCS["unnamed",
>             DATUM["unknown",
>                 SPHEROID["unretrievable - using
>     WGS84",6378137,298.257223563]],
>             PRIMEM["Greenwich",0],
>             UNIT[,0.0174532925199433]],
>         UNIT["unknown",1],
>         AUTHORITY["EPSG","0"]]
> 
> 
>      Which I think is the root of my problem. Is ther ea good/easy way
>     for me to fix this ? quickly ?
> 
>      Court,
> 
>      I *suspect* GDAL is failing to find it's supporting coordinate system
>      files.  Try setting the GDAL_DATA environment variable to point to the
>      directory with the files like pcs.csv and ecw_cs.wkt.
> 
>      It would also be helpful if you were able to indicate the file format
>      with the problem, the version of GDAL, and ideally a sample file.
> 
>      Best regards,
>      --
>      ---------------------------------------+--------------------------------------
>      I set the clouds in motion - turn up   | Frank Warmerdam,
>     warmerdam at pobox.com <mailto:warmerdam at pobox.com>
>     <mailto:warmerdam at pobox.com <mailto:warmerdam at pobox.com>>
>      light and sound - activate the windows |
>     http://pobox.com/~warmerdam <http://pobox.com/%7Ewarmerdam>
>     <http://pobox.com/%7Ewarmerdam>
>      and watch the world go round - Rush    | President OSGeo,
>     http://osgeo.org <http://osgeo.org>
> 
> 
>      _______________________________________________
>     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
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list