The IDLffShape::Open function method opens a specified Shapefile.
Result = Obj->[IDLffShape::]Open( `Filename' [, /DBF_ONLY] [, ENTITY_TYPE='value'] [, /UPDATE] )
Returns 1 if the file can be read successfully. If not able to open the file, it returns 0.
A scalar string containing the full path and filename of a Shapefile (
.shp) to open. Note that the
.dbx files must exist in the same directory for you to be able to open and access the file unless the UPDATE keyword is set.
If this keyword is set to a positive value, only the underlying dBASE table (.
dbf) component of the shapefile is opened. All entity related files are left closed. Two values to this keyword are accepted: 1 - Open an existing .
dbf file, > 1 - Create a new .
The UPDATE keyword is required to open the .
dbf file for updating.
Set this keyword to the entity type of a new Shapefile. Use this keyword only when creating a new Shapefile. For more information on entity types, see Entities.
Set this keyword to have the file opened for writing. The default is read-only.
In the following example, the file
examples/data/states.shp is opened for reading and writing:
status = myShape->Open(FILEPATH('states.shp', $ SUBDIR=['examples', 'data']), /UPDATE)
DBF_ONLY keyword: 5.6