|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.geotools.io.GeoImportUtil
public class GeoImportUtil
In dieser Klasse sind Funktionen zum Datenimport von Geo-Daten zusammengefasst.
Nested Class Summary | |
---|---|
static class |
GeoImportUtil.ARCASCII_IMPORT_TYPE
This type specifies how this class can proceed the import of ASCII rasters. |
static class |
GeoImportUtil.ARCASCII_POSTFIXES
These postfixes are associated with Arc/Info ASCII Grid files TODO .0 habe ich auch schon gesehen. |
static class |
GeoImportUtil.GEOTIFF_POSTFIXES
These postfixes are associated with GeoTiff files |
static class |
GeoImportUtil.IMAGE_POSTFIXES
These postfixes are associated with ordinary image files, excluding GeoTIFF endings please |
static class |
GeoImportUtil.SHP_POSTFIXES
These postfixes are associated with ESRI SHape files |
static class |
GeoImportUtil.WORLD_POSTFIXES
These postfixes are associated with world files |
Constructor Summary | |
---|---|
GeoImportUtil()
|
Method Summary | |
---|---|
static AbstractGridCoverage2DReader |
createGridReaderFromGeoTiff(File file)
Deprecated. WorldImageReader klappt noch nicht so 100%ig
(Colorisierung schlaegt fehl!) |
static AbstractGridCoverage2DReader |
createGridReaderFromGeoTiff(File file,
CoordinateReferenceSystem crs)
Deprecated. WorldImageReader klappt noch nicht so 100%ig
(Colorisierung schlaegt fehl!) |
static CoordinateReferenceSystem |
determineProjection(File file)
Liest das CRS aus einer Datei. |
static CoordinateReferenceSystem |
determineProjection(URL prjUrl)
Liest das CRS aus einer URL. |
static GeoImportUtil.ARCASCII_IMPORT_TYPE |
getAsciiRasterImportMode()
Returns the default CRS used if no CRS can be found during import. |
static CoordinateReferenceSystem |
getDefaultCRS()
Returns the default CRS used if no CRS can be found during import. |
static DataStore |
readDataStoreFromShape(URL shpURL,
URL prjURL)
Creates a DataStore from shape file |
static |
readFeaturesFromShapeFile(File file)
Diese Methode extrahiert saemtliche Features aus einem ShapeFile-Projekt ( name.shp name.prj name.dbf ... |
static |
readFeaturesFromShapeURL(URL url,
URL prjUrl)
Diese Methode extrahiert saemtliche Features aus einem ShapeFile-Projekt ( name.shp name.prj name.dbf ... |
static Vector<Geometry> |
readGeometriesFromShapeFile(File file)
Diese Methode extrahiert saemtliche Geometrien aus einem ShapeFile-Projekt ( name.shp name.prj name.dbf ... |
static GridCoverage2D |
readGridFromArcInfoASCII(Object input)
Imports a raster from file or URL in ArcInfoASCII format. |
static GridCoverage2D |
readGridFromArcInfoASCII(Object input,
CoordinateReferenceSystem crs)
Imports a raster from file or URL in ArcInfoASCII format. |
static GridCoverage2D |
readGridFromGeoTiff(File file)
Diese Methode importiert ein Raster aus einer Datei im GeoTIFF-Format. |
static GridCoverage2D |
readGridFromGeoTiff(File file,
CoordinateReferenceSystem crs)
Diese Methode importiert ein Raster aus einer Datei im GeoTIFF-Format. |
static WritableGridRaster |
readGridRasterFromArcInfoASCII(Object input)
Import a raster from file or URL in ArcInfoASCII format. |
static WritableGridRaster |
readGridRasterFromArcInfoASCII(Object input,
CoordinateReferenceSystem crs)
Import a raster from file or URL in ArcInfoASCII format. |
static WritableGridRaster |
readGridRasterFromGeoTiff(File file)
Diese Methode importiert ein Raster aus einer Datei im GeoTIFF-Format. |
static WritableGridRaster |
readGridRasterFromGeoTiff(File file,
CoordinateReferenceSystem crs)
Diese Methode importiert ein Raster aus einer Datei im GeoTIFF-Format. |
static CoordinateReferenceSystem |
readProjectionFile(File prjFile)
Liest ein CRS aus einer Datei. |
static CoordinateReferenceSystem |
readProjectionFile(URL prjURL)
Liest ein CRS aus einer URL. |
static String |
readProjectionString(URL url)
Liest alle Zeilen aus der prj-Datei URL und fuegt diese zu einem String zusammen Kommentarzeilen werden ignoriert. |
static double[] |
readWorldFile(File file)
Liest ein World-File (.tfw) ein und liefert die darin zeilenweise gespeicherten Werte zurueck. |
static double[] |
readWorldFile(InputStream inputStream)
Liest ein World-File (.tfw) ein und liefert die darin zeilenweise gespeicherten Werte zurueck. |
static void |
setAsciiRasterImportMode(GeoImportUtil.ARCASCII_IMPORT_TYPE mode)
Sets how this class proceeds the import of ASCII rasters. |
static void |
setDefaultCRS(CoordinateReferenceSystem crs)
Sets the default CRS used if no CRS can be found during import. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeoImportUtil()
Method Detail |
---|
public static void setAsciiRasterImportMode(GeoImportUtil.ARCASCII_IMPORT_TYPE mode)
mode
- the mode how to proceed the importpublic static GeoImportUtil.ARCASCII_IMPORT_TYPE getAsciiRasterImportMode()
public static void setDefaultCRS(CoordinateReferenceSystem crs)
crs
- the new default CRSpublic static CoordinateReferenceSystem getDefaultCRS()
public staticreadFeaturesFromShapeURL(URL url, URL prjUrl) throws IOException
name.shp name.prj name.dbf ...
) und
speichert diese in einer
org.geotools.feature.FeatureCollection
.
url
- URL
to Shape-FileprjUrl
- URL
zu .prj Datei des Shape-File
FeatureCollection
that was read
IOException
public staticreadFeaturesFromShapeFile(File file) throws Exception
name.shp name.prj name.dbf ...
) und
speichert diese in einer
org.geotools.feature.FeatureCollection
.
file
- Shape-File
Exception
- bei irgendeinem Fehlerpublic static DataStore readDataStoreFromShape(URL shpURL, URL prjURL) throws IOException
DataStore
from shape file
shpURL
- URL to shape fileprjURL
- URL to projection file
IOException
- if an error occurpublic static Vector<Geometry> readGeometriesFromShapeFile(File file) throws Exception
name.shp name.prj name.dbf ...
) und
speichert diese in einer Liste (Vector) von
com.vividsolutions.jts.geom.Geometry
-Objekten.
org.geotools.data.shapefile.shp.ShapefileReader
com.vividsolutions.jts.geom.Geometry
file
- Shape-File
Exception
- bei irgendeinem Fehlerpublic static GridCoverage2D readGridFromArcInfoASCII(Object input) throws Exception
DEFAULT_CRS
is used.
input
- file or URL to the input filecrs
- CRS forced to use (can be null
)
Exception
public static GridCoverage2D readGridFromArcInfoASCII(Object input, CoordinateReferenceSystem crs) throws Exception
DEFAULT_CRS
is used.
input
- file or URL to the input filecrs
- CRS forced to use (can be null
)
Exception
public static GridCoverage2D readGridFromGeoTiff(File file) throws Exception
file
- GeoTIFF-File
Exception
- bei irgendeinem FehlerreadGridFromGeoTiff(File, CoordinateReferenceSystem)
public static GridCoverage2D readGridFromGeoTiff(File file, CoordinateReferenceSystem crs) throws Exception
file
- GeoTIFF-Filecrs
- erzwungenes CoordinateReferenceSystem fuer das Raster (kann
null
sein)
Exception
- bei irgendeinem FehlercreateGridReaderFromGeoTiff(File, CoordinateReferenceSystem)
public static AbstractGridCoverage2DReader createGridReaderFromGeoTiff(File file, CoordinateReferenceSystem crs) throws Exception
WorldImageReader
klappt noch nicht so 100%ig
(Colorisierung schlaegt fehl!)
AbstractGridCoverage2DReader
aus
einer Datei im GeoTIFF-Format. Zunaechst wird versucht, die
Geo-Informationen (Referenz+CRS) aus den TIFF-Metadaten zu ermitteln. Ist
dies nicht erfolgreich, werden ein gleichnamiges World-File (.tfw) und
Projection-File (.prj) herangezogen (siehe WorldImageReader
).
file
- GeoTIFF-Filecrs
- erzwungenes CoordinateReferenceSystem fuer das Raster (kann
null
sein)
Exception
- bei irgendeinem Fehlerpublic static AbstractGridCoverage2DReader createGridReaderFromGeoTiff(File file) throws Exception
WorldImageReader
klappt noch nicht so 100%ig
(Colorisierung schlaegt fehl!)
AbstractGridCoverage2DReader
aus
einer Datei im GeoTIFF-Format.
file
- GeoTIFF-File
Exception
- bei irgendeinem FehlercreateGridReaderFromGeoTiff(File, CoordinateReferenceSystem)
public static WritableGridRaster readGridRasterFromArcInfoASCII(Object input) throws Exception
DEFAULT_CRS
is used.
input
- ASCII file or URL to the input file
Exception
public static WritableGridRaster readGridRasterFromArcInfoASCII(Object input, CoordinateReferenceSystem crs) throws Exception
DEFAULT_CRS
is used.
input
- ASCII file or URL to the input filecrs
- CRS forced to use (can be null
)
Exception
public static WritableGridRaster readGridRasterFromGeoTiff(File file) throws Exception
DEFAULT_CRS
als CRS verwendet.
file
- GeoTIFF-File
Exception
- bei irgendeinem Fehlerpublic static WritableGridRaster readGridRasterFromGeoTiff(File file, CoordinateReferenceSystem crs) throws Exception
DEFAULT_CRS
als CRS verwendet.
file
- GeoTIFF-Filecrs
- erzwungenes CoordinateReferenceSystem fuer das Raster (kann
null
sein)
Exception
- bei irgendeinem Fehlerpublic static double[] readWorldFile(File file) throws IOException
double
umgewandelt werden, wird diese Zeile ignoriert, als 1.0 interpretiert und
eine Meldung in die Standard-Fehler-Ausgabe geschrieben.
file
- World-File
IOException
- falls die Datei nicht existiert oder ein unerwarteter
Fehler beim Einlesen auftrittIOUtil.isCommentLine(String)
,
System.err
public static double[] readWorldFile(InputStream inputStream) throws IOException
double
umgewandelt werden, wird diese Zeile ignoriert, als 1.0 interpretiert und
eine Meldung in die Standard-Fehler-Ausgabe geschrieben.
inputStream
- Stream of World-File
IOException
- falls die Datei nicht existiert oder ein unerwarteter
Fehler beim Einlesen auftrittIOUtil.isCommentLine(String)
,
System.err
public static CoordinateReferenceSystem determineProjection(File file) throws IOException
file
- Datei
null
, wenn kein CRS gelesen werden konnte
IOException
public static CoordinateReferenceSystem determineProjection(URL prjUrl)
DEFAULT_CRS
benutzt wird.
public static CoordinateReferenceSystem readProjectionFile(URL prjURL) throws IOException
prjURL
- prj-Datei in der die Projektion hinterlegt ist
null
, wenn kein CRS gelesen werden konnte
IOException
- falls die URL nicht wie erwartet gelesen werden konnte.GTUtil.createCRS(String)
public static CoordinateReferenceSystem readProjectionFile(File prjFile) throws IOException
prjFile
- prj-Datei in der die Projektion hinterlegt ist
null
, wenn kein CRS gelesen werden konnte
IOException
GTUtil.createCRS(String)
public static String readProjectionString(URL url) throws IOException
url
- URL
auf prj-Datei
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |