|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.unex.sextante.gui.grass.GrassUtils
public class GrassUtils
Field Summary | |
---|---|
static java.lang.String |
colorTableExt
|
static java.lang.String |
colorTableIdentifier
|
static java.lang.String |
colorTableVersion
|
static int |
GEOM_TYPE_FACE
|
static int |
GEOM_TYPE_KERNEL
|
static int |
GEOM_TYPE_LINE
|
static int |
GEOM_TYPE_POINT
|
static int |
GEOM_TYPE_POLYGON
|
static int |
MAJOR_MAX
|
static int |
MAJOR_MIN
|
static int |
MINOR_MAX
|
static int |
MINOR_MIN
|
static java.lang.String |
TEMP_PREFIX
|
Constructor Summary | |
---|---|
GrassUtils()
|
Method Summary | |
---|---|
static void |
cancelProcess()
|
static java.io.File |
createStartupScript()
Creates a compact startup script for GRASS. |
static void |
createTempMapset()
Creates a temporary location and mapset(s) for GRASS data processing. |
static void |
deleteComFile()
|
static void |
deleteTempMapset()
Deletes the location and mapset(s) for GRASS data processing. |
static java.lang.String |
getBatchJobFile()
|
static java.io.File |
getComFile()
|
static java.lang.ProcessBuilder |
getGrassExecutable()
Returns a ProcesBuilder ready to execute grass. |
static java.lang.String |
getGroup(GeoAlgorithm grass)
Return the group associated to a GRASS algorithm. |
static int |
getNumFaces(java.lang.String sMapName)
Returns the number of geometries of type FACE in a GRASS map. |
static int |
getNumGeoms(java.lang.String sMapName,
int iGeomType)
Returns the number of geometries of a specified type in a GRASS map. |
static int |
getNumKernels(java.lang.String sMapName)
Returns the number of geometries of type KERNEL in a GRASS map. |
static int |
getNumLines(java.lang.String sMapName)
Returns the number of geometries of type LINE in a GRASS map. |
static int |
getNumPoints(java.lang.String sMapName)
Returns the number of geometries of type POINT in a GRASS map. |
static int |
getNumPolygons(java.lang.String sMapName)
Returns the number of geometries of type POLYGON in a GRASS map. |
static java.lang.Process |
getProcess()
|
static java.lang.String |
getTempMapName()
Returns a GRASS map name which can be safely used to store an imported layer (i.e. there is no chance that it will overwrite an existing map in the mapset). |
static java.lang.String |
getTempMapName(java.lang.String sPrefix)
Returns a GRASS map name which can be safely used to store an imported layer or any other GRASS element (a region setting, a group) that is significant in our context. |
static boolean |
isLatLon()
Checks if the current GRASS mapset (rather: the location of which it is part) works in lat/lon degrees. |
static boolean |
isMap3D(java.lang.String sMapName)
Checks if a GRASS vector map contains 3D data. |
static boolean |
isMultiGeom(java.lang.String sMapName)
|
static boolean |
isProcessCanceled()
|
static boolean |
isSupported()
|
static void |
runGRASS(java.lang.StringBuffer sCommand,
java.lang.String sMessage,
GrassAlgorithm alg)
Runs a batch of GRASS commands. |
static void |
setExecutable(java.lang.String pathname)
A convenience method to set the owner's execute permission for this abstract pathname. |
static void |
setInterruptible(boolean choice)
|
static void |
writeColorTable(Output out)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAJOR_MIN
public static final int MAJOR_MAX
public static final int MINOR_MIN
public static final int MINOR_MAX
public static final int GEOM_TYPE_POINT
public static final int GEOM_TYPE_LINE
public static final int GEOM_TYPE_POLYGON
public static final int GEOM_TYPE_FACE
public static final int GEOM_TYPE_KERNEL
public static final java.lang.String colorTableExt
public static final java.lang.String colorTableIdentifier
public static final java.lang.String colorTableVersion
public static final java.lang.String TEMP_PREFIX
Constructor Detail |
---|
public GrassUtils()
Method Detail |
---|
public static java.lang.Process getProcess()
public static boolean isProcessCanceled()
public static void setInterruptible(boolean choice)
public static void cancelProcess()
public static java.io.File createStartupScript()
public static java.lang.ProcessBuilder getGrassExecutable()
public static boolean isSupported()
public static java.lang.String getBatchJobFile()
public static java.lang.String getGroup(GeoAlgorithm grass)
grass
- a GRASS algorithm
public static java.lang.String getTempMapName(java.lang.String sPrefix)
sPrefix
- a prefix for the temp map namepublic static java.lang.String getTempMapName()
public static int getNumGeoms(java.lang.String sMapName, int iGeomType) throws GrassExecutionException
sMapName
- Name of GRASS map to queryiGeomType
- Type of geometry to query. Choices are: GEOM_TYPE_POINT, GEOM_TYPE_LINE, GEOM_TYPE_POLYGON
GrassExecutionException
public static int getNumPoints(java.lang.String sMapName) throws GrassExecutionException
sMapName
- Name of GRASS map to query
GrassExecutionException
public static int getNumLines(java.lang.String sMapName) throws GrassExecutionException
sMapName
- Name of GRASS map to query
GrassExecutionException
public static int getNumPolygons(java.lang.String sMapName) throws GrassExecutionException
sMapName
- Name of GRASS map to query
GrassExecutionException
public static int getNumFaces(java.lang.String sMapName) throws GrassExecutionException
sMapName
- Name of GRASS map to query
GrassExecutionException
public static int getNumKernels(java.lang.String sMapName) throws GrassExecutionException
sMapName
- Name of GRASS map to query
GrassExecutionException
public static boolean isMap3D(java.lang.String sMapName) throws GrassExecutionException
sMapName
- Name of GRASS map to query
GrassExecutionException
public static boolean isLatLon()
public static boolean isMultiGeom(java.lang.String sMapName) throws GrassExecutionException
GrassExecutionException
public static void runGRASS(java.lang.StringBuffer sCommand, java.lang.String sMessage, GrassAlgorithm alg) throws GrassExecutionException
sCommand
- String buffer containing GRASS commandssMessage
- String with message to write into logfile
GrassExecutionException
public static void setExecutable(java.lang.String pathname) throws GrassExecutionException
pathname
- a pathname string
GrassExecutionException
public static void createTempMapset() throws java.io.IOException
java.io.IOException
public static void deleteTempMapset()
public static void writeColorTable(Output out)
public static java.io.File getComFile()
public static void deleteComFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |