[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [netcdf-java] ncWMS and ellipsoid-support in CF-1.2



On 6/9/2010 7:08 AM, Heiko Klein wrote:
Hi John,

when we discussed the issue of ellipsoid-support in netcdf-java back in
March in the mailing-list it went very fast to: use one or another GeoAPI.

This sounded to me like a lot of work for you. If you don't plan to do
this work in the near future (i.e. 2010), could you please send me the
proj4j source. Maybe I can try then to add ellipsoid support of
Stereographic and Transverse Mercator to netcdf-java (4.2) during summer.

Best regards,

Heiko

Hi Heiko:

Im not sure how fast i can get to that. Do you have real datasets with those projections?

The proj4 code is from the jhlabs partial port at

http://www.jhlabs.com/java/maps/proj/index.html

The ones that ive already done are at

http://svn.unidata.ucar.edu/repos/common/java/trunk/src/main/java/ucar/unidata/geoloc/projection/proj4/

I should warn you that I have seen bugs in the Java, which i think is some automatic C/Java translater. I have been checking against the original C code. Also, theres a lot of modifications to be made to make it compatible with our Projection class. Thats why the Geotools API may be a better idea.

BTW, Transverse Mercator on the ellipsoid i think is UTM, which we have. So perhaps you only need Stereographic ?

John


On 2010-03-24 17:46, John Caron wrote:
Heiko Klein wrote:
Hi Jon,

I just found some time to look at the source of netcdf-java 4.1. As far
as I can see, only some projections (LambertConformalConicEllipse,
AlbersEqualAreaEllipse, UTM) support ellipsoids, while the others use a
constant spherical earth with EARTH_RADIUS = 6371.229km

In particular, Stereographic projection doesn't support ellipsoids, so
this explains the offset in my maps.

Would be nice to have this assured by one of the unidata-developpers. I
mainly checked the ucar/unidata/geoloc/projection sources.

Best regards,

Heiko
Yes, correct. We are slowly adding ellipsoid support, but only after we
have a sample dataset that uses them. We are porting code from proj4,
its rather time-consuming to get it right.
if you have sample data where the ellipsoidal earth matters, send it
along, we'll get to it when we can. or, if you have resources and
expertise to port the proj4j code, i could send that to you and get you
started.

John

On 2010-03-10 14:38, Jonathan Blower wrote:
Hi Heiko,

This is a good question.  ncWMS relies on netcdf-java for converting
coords to wgs84 lat lon, so I'm copying this to the mailing list in
the hope that someone can enlighten me about ellipsoid support in the
library.

Cheers, Jon

-----Original Message-----
From: Heiko Klein<address@hidden>
Sent: 09 March 2010 08:54
To: Jonathan Blower<address@hidden>
Subject: ncWMS and ellipsoid-support in CF-1.2

Hi Jon,

I currently try to visualize some satellite ice-maps over the north-pole
with ncWMS, but the data seems to be displaced by some 10-30km compared
with the land-maps (generated by mapserver).

While geo-tools and therefore ncWMS support lots of coordinate reference
systems for the presented maps, the support for ellipsoids was only
added to CF-1.2. Do you know if ncWMS already supports the CF-1.2
features like semi_major_axis/semi_minor_axis for input-files, or does
it assume the CF-1.0 spherical earth with 6371km radius?

Best regards,

Heiko

_______________________________________________
netcdf-java mailing list
address@hidden
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/