Package org.apache.tika.parser.gdal
Class GDALParser
java.lang.Object
org.apache.tika.parser.gdal.GDALParser
- All Implemented Interfaces:
Serializable,org.apache.tika.parser.Parser
Wraps execution of the Geospatial Data Abstraction
Library (GDAL)
gdalinfo tool used to extract geospatial
information out of hundreds of geo file formats.
The parser requires the installation of GDAL and for gdalinfo to
be located on the path.
Basic information (Size, Coordinate System, Bounding Box, Driver, and
resource info) are extracted as metadata, and the remaining metadata patterns
are extracted and added.
The output of the command is available from the provided
ContentHandler in the
parse(InputStream, ContentHandler, Metadata, ParseContext) method.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<org.apache.tika.mime.MediaType>getSupportedTypes(org.apache.tika.parser.ParseContext context) voidparse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) processCommand(InputStream stream) voidsetCommand(String command) voidsetMaxStdErr(int maxStdErr) voidsetMaxStdOut(int maxStdOut) voidsetTimeoutMs(long timeoutMs)
-
Field Details
-
DEFAULT_TIMEOUT_MS
public static final long DEFAULT_TIMEOUT_MS- See Also:
-
-
Constructor Details
-
GDALParser
public GDALParser()
-
-
Method Details
-
getCommand
-
setCommand
-
processCommand
-
getSupportedTypes
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context) - Specified by:
getSupportedTypesin interfaceorg.apache.tika.parser.Parser
-
parse
public void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException - Specified by:
parsein interfaceorg.apache.tika.parser.Parser- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
setTimeoutMs
@Field public void setTimeoutMs(long timeoutMs) -
setMaxStdErr
@Field public void setMaxStdErr(int maxStdErr) -
setMaxStdOut
@Field public void setMaxStdOut(int maxStdOut)
-