visad.data.gis
Class ArcAsciiGridForm
- java.lang.Object
-
- visad.data.FormNode
-
- visad.data.Form
-
- visad.data.gis.ArcAsciiGridForm
-
- All Implemented Interfaces:
- FormFileInformer
public class ArcAsciiGridForm extends Form implements FormFileInformer
ArcAsciiGridForm is the ARC/INFO ASCIIGRID data format adapter for serialized visad.Data objects. See http://www.climatesource.com/format/arc_asciigrid.html for more info
-
-
Constructor Summary
Constructors Constructor and Description ArcAsciiGridForm()Construct a Form for reading in ARC/INFO ASCIIGRID filesArcAsciiGridForm(MathType dataType)Construct a Form for reading in Arc/Info ASCIIGRID files
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String id, Data data, boolean replace)Add data to an existing data objectjava.lang.String[]getDefaultSuffixes()Get a list of default suffixes for McIDAS map filesFormNodegetForms(Data data)Return the data forms that are compatible with a data objectbooleanisThisType(byte[] block)Determines if this is a ARC/INFO ASCIIGRID file from the starting blockbooleanisThisType(java.lang.String name)Determines if this is a ARC/INFO ASCIIGRID file from the nameDataImplopen(java.lang.String id)Open the file specified by the stringDataImplopen(java.net.URL url)Open the file specified by the URLvoidsave(java.lang.String id, Data data, boolean replace)Save a VisAD data object in this form-
Methods inherited from class visad.data.Form
getMathType
-
-
-
-
Constructor Detail
-
ArcAsciiGridForm
public ArcAsciiGridForm()
Construct a Form for reading in ARC/INFO ASCIIGRID files
-
ArcAsciiGridForm
public ArcAsciiGridForm(MathType dataType)
Construct a Form for reading in Arc/Info ASCIIGRID files
-
-
Method Detail
-
isThisType
public boolean isThisType(java.lang.String name)
Determines if this is a ARC/INFO ASCIIGRID file from the name- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
name- name of the file- Returns:
- true if it matches the pattern for ARC/INFO ASCIIGRID files
-
isThisType
public boolean isThisType(byte[] block)
Determines if this is a ARC/INFO ASCIIGRID file from the starting block- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
block- block of data to check- Returns:
- false - there is no identifying block in a ARC/INFO ASCIIGRID file
-
getDefaultSuffixes
public java.lang.String[] getDefaultSuffixes()
Get a list of default suffixes for McIDAS map files- Specified by:
getDefaultSuffixesin interfaceFormFileInformer- Returns:
- valid list of suffixes
-
save
public void save(java.lang.String id, Data data, boolean replace) throws BadFormException, java.io.IOException, java.rmi.RemoteException, VisADExceptionSave a VisAD data object in this form- Specified by:
savein classFormNode- Throws:
UnimplementedException- - can't be done yet.BadFormExceptionjava.io.IOExceptionjava.rmi.RemoteExceptionVisADException
-
add
public void add(java.lang.String id, Data data, boolean replace) throws BadFormExceptionAdd data to an existing data object- Specified by:
addin classFormNode- Throws:
BadFormException
-
open
public DataImpl open(java.lang.String id) throws BadFormException, VisADException
Open the file specified by the string- Specified by:
openin classFormNode- Parameters:
id- string representing the path to the file- Returns:
- a Data object representing the map lines.
- Throws:
BadFormExceptionVisADException
-
open
public DataImpl open(java.net.URL url) throws BadFormException, VisADException, java.io.IOException
Open the file specified by the URL- Specified by:
openin classFormNode- Parameters:
url- URL of the remote map file- Returns:
- a Data object representing the map lines.
- Throws:
BadFormExceptionVisADExceptionjava.io.IOException
-
-
DMelt 3.0 © DataMelt by jWork.ORG