[gdal-dev] Projection issue with a netcdf file

Kyle Shannon ksshannon at gmail.com
Tue Jan 12 15:38:24 EST 2010


After a little digging, it appears that the netCDF driver does not support
the tag:

Lambert_Conformal:standard_parallel

it supports:
Lambert_Conformal:standard_parallel_1
and:
Lambert_Conformal:standard_parallel_2

I am not sure if the tag is out of specification, or if the driver needs to
be updated.  I also notice OGRSpatialReference has a separate function for
setting a Lambert Conformal Conic with single parallel:

OGRErr SetLCC1SP( *double* dfCenterLat, *double* dfCenterLong, ...

but this is not referenced in the netCDF driver.

So, my next question is:
Can you specify the value of SP_1 and SP_2 as the same parallel in the
standard LCC, or do you have to set LCC1SP

Thanks everyone for your patience,

kss

# ===================
Kyle Shannon
Physical Science Technician
RMRS Fire Sciences Lab
Fire, Fuels & Smoke - RWU 4405
5775 Highway 10 W.
Missoula, MT 59808
(406)646-6577
kshannon at fs.fed.us
ksshannon at gmail.com
# ===================


On Tue, Jan 12, 2010 at 11:26 AM, Christopher Barker
<Chris.Barker at noaa.gov>wrote:

> Kyle Shannon wrote:
>
>> ncdump -h reports the same correct standard parallels (25) whereas
>> Coordinate System reports 0 for both standard parallels.  It appears the
>> projection is a Lambert Conformal Conic with 2 standard parallels, but they
>> are the same effectively making it a lcc with 1 standard parallel.
>>
>
> It looks like GDAL doesn't understand those parameters:
>
> from: http://www.gdal.org/frmt_netcdf.html:
>
> """
> Georeference
> There is no universal way of storing georeferencing in netCDF files. The
> driver first tries to follow the CF-1 Convention from UNIDATA looking for
> the Metadata named "grid_mapping". If "grid_mapping" is not present, the
> driver will try to find an lat/lon grid array to set geotransform array. The
> NetCDF driver verifies that the Lat/Lon array is equally space.
>
> If those 2 methods fail, NetCDF driver will try to read the following
> metadata directly and set up georefenrencing.
>
>    * spatial_ref (Well Known Text)
> ...
> """
>
> So to get the spatial reference right, the netcdf file needs a proper
> spatial_ref parameter in WKT format. What does ncdump tell you it has? If
> it's not right, you can either get whoever is running your server to fix it,
> or you can fix it yourself by processing the nc file with something:
>  ncdump-> filter -> ncgen
>  NCO utilitites
>  python (or perl, or ???) scripts.
>
>
> good luck!
>
>
> -Chris
>
>
>
>
>
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100112/d1c7cee8/attachment.html


More information about the gdal-dev mailing list