Hi,
please read below...

On Mon, Dec 3, 2012 at 10:13 AM, Boided <[email protected]> wrote:

> Hi,
>     I am trying to open a .dt2 extension file with
>  AbstractGridFormat format = GridFormatFinder.findFormat(rasterFile);
>       AbstractGridCoverage2DReader  reader = format.getReader(rasterFile);
>
> the .dt2 extension seems to me related to a DTED file, so you should make
sure to have the gt-imageio-ext-gdal plugin (and all the related
dependencies) on your classpath as well as the proper set of native libs to
use GDAL, depending on the OS you are using. If you are using the tutorial
for learning purposes I would suggest to start with basic formats without
involving external dependencies to make things easier.


>
> and i am getting the following error:
>
> Exception in thread "main" java.lang.UnsupportedOperationException: Trying
> to get a reader from an unknown format.
>         at
>
> org.geotools.coverage.grid.io.UnknownFormat.getReader(UnknownFormat.java:62)
>
> I read in the tutorial that geotiff and .jpeg files are supported. but i am
> not able to open any file except the .tif file
>
It may depend on the files you are trying to read.
Note that the geotools readers deal with geospatial datasets so you should
make sure to have all the needed information in terms of grid to world
transformation and coordinate reference system.
As an instance, when trying to read a JPEG, you should also have a world
file (which provides info about how to go from image's pixel locations to
world positions) and a PRJ file containing the WKT of the coordinate
reference system of that image. A GeoTiff usually has this information
(raster 2 model and CRS) inside the file itself.

Hope this helps.
Daniele



> Is there any other Format for the other types of files
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/Reading-a-DT2-file-tp5020285.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Keep yourself connected to Go Parallel:
> BUILD Helping you discover the best ways to construct your parallel
> projects.
> http://goparallel.sourceforge.net
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>



-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
BUILD Helping you discover the best ways to construct your parallel projects.
http://goparallel.sourceforge.net
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to