That is correct.  I have a tif and tfw, but no prj file.  This is how they
came from NACO.

I've tried it with the GEOTiffReader with the following code:
GeoTiffReader gtReader = new GeoTiffReader(testFile);

I get the following exception:
Exception in thread "main" java.lang.NullPointerException
       at javax.units.Unit.isCompatible(Unit.java:164)
       at org.geotools.referencing.cs.DefaultCoordinateSystemAxis.usingUnit
(DefaultCoordinateSystemAxis.java:883)
       at org.geotools.referencing.cs.AbstractCS.axisUsingUnit(
AbstractCS.java:461)
       at org.geotools.referencing.cs.DefaultCartesianCS.usingUnit(
DefaultCartesianCS.java:266)
       at
org.geotools.gce.geotiff.crs_adapters.GeoTiffMetadata2CRSAdapter.createUserDefinedPCS
(GeoTiffMetadata2CRSAdapter.java:716)
       at
org.geotools.gce.geotiff.crs_adapters.GeoTiffMetadata2CRSAdapter.createProjectedCoordinateSystem
(GeoTiffMetadata2CRSAdapter.java:303)
       at
org.geotools.gce.geotiff.crs_adapters.GeoTiffMetadata2CRSAdapter.createCoordinateSystem
(GeoTiffMetadata2CRSAdapter.java:240)
       at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(
GeoTiffReader.java:271)
       at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java
:198)
       at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java
:115)
       at com.aviationapps.aviationmapviewer.gui.Main.main(Main.java:61)
Java Result: 1

If you have somewhere that I could send the files for a bug report, I could
do that.  They are about 47MB in size.

Thank you!
Jess



On 7/10/07, Jody Garnett <[EMAIL PROTECTED]> wrote:

Jesse Sightler wrote:
> Hi All,
>
> I am completely new to GIS and geotools, so please forgive me if what
> I am asking is completely stupid.  :)
>
> Basically, I am trying to programatically determine the geographical
> coordinates at various points inside of a GEOTiff file.  The tiff file
> also has a coordinates file attached that is the following:
> 63.930295999999991
> 0.0
> 0.0
> -63.930295999999991
> -411206.90390770847
> 18884.472706639983
> ...
>
> Is there any documentation that really describes what the various
> coordinate systems represent and how they can be used?  I've read some
> of the docs on the website, but it's pretty confusing for someone
> completely new to this whole world.
Interesting; what you say is not something I am used to... so we are
both confused.

I am used to having Either:
- a GeoTiff file has the coordintes (and projection) written inside the
file
-or it is a WorldImage file (ie normal TIFF + Coordiantes + PRJ file)

The PRJ file is written in human readable text and describes what the
coordinates mean. Here is an example:
> GEOGCS[
>   "WGS 84",
>   DATUM[
>     "WGS_1984",
>     SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],
>     TOWGS84[0,0,0,0,0,0,0],
>     AUTHORITY["EPSG","6326"]],
>   PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
>   UNIT["DMSH",0.0174532925199433,AUTHORITY["EPSG","9108"]],
>   AXIS["Lat",NORTH],
>   AXIS["Long",EAST],
>   AUTHORITY["EPSG","4326"]]
So would like to ask you two questions:
- can you try using the GeoTIFF reader? It should ignore the coordiants
file and just look inside the GeoTIFF
- do you have a prj file to go with your coordinates?

Have you been able to read a GridCoverage yet? I don't have a source
code example in the users guide yet - since it is not my area of
expertises.
Cheers,
Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to