Guðmundur Jökulsson | 3 Feb 16:56 2006
Picon
Picon

projection for data in HDF5 with proj4 string defs.

Hi there,
a geotools newbee here - that has lost hope of finding the answer on the 
google-hit lists.

Im am writing a java app. to swallow hdf5 files (made to XML by 
hdf5dump), take some of the geodata in there and convert to a predefined 
projection saved in some GML-profile derivate.  I thought I could use 
something like the gmltools org.opengis.referencing.crs.* classes to do 
this.

My problem is that in the hdf5 document I only have the source 
projection defined by a proj4 string (typically:
"proj=laea lon_0=6.732576 lat_ts=60.000000 lat_0=61.284970 units=m 
a=6378137.0 b=6356752.3")

How do I get a working transformation instance from the proj4 string, to 
be able to transfer source points - into EPSG:4326 points for example?

Can I use any known input AUTHOROTY code and get the CRS.decode() to to 
the job for me: CoordinateReferenceSystem coord = CRS.decode(???);

Or is there a tool to get form proj4 type string definitions to the WKT 
format string?

please help ...

greatings,
gudmundur

-------------------------------------------------------
(Continue reading)

Martin Desruisseaux | 4 Feb 07:35 2006

Re: projection for data in HDF5 with proj4 string defs.

Guðmundur Jökulsson a écrit :
> My problem is that in the hdf5 document I only have the source 
> projection defined by a proj4 string (typically:
> "proj=laea lon_0=6.732576 lat_ts=60.000000 lat_0=61.284970 units=m a=6378137.0 b=6356752.3")

Geotools curently do not have any support for parsing directly a Proj4 
string. However, given the wide range of tools build on top of Proj4, it 
may be something that we may need to support. If we find a volonter for 
that...

In the main time, a possible approach would be to convert the Proj4 
string into a WKT string (Well Know Text). The WKT format is 
standardized by OGC, and looks like as in the bottom of the following page:

http://www.geotools.org/display/GEOTOOLS/Coordinate+Transformation+Services+for+Geotools+2.1

I never searched, but it seems likely to me that some tools should 
exists for converting a Proj4 string into a WKT string. Geotools can 
parse directly WKT string.

	Martin.

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642

Gmane