The IDLffShape::Init function method initializes or constructs a Shapefile object.
Result = OBJ_NEW(`IDLffShape' [, Filename] [, PROPERTY=value])
Result = Obj->[IDLffShape::]Init([, Filename] [, PROPERTY=value]) (Only in a subclass' Init method.)
When this method is called indirectly, as part of the call to the OBJ_NEW function, the return value is an object reference to the newly-created object.
When called directly within a subclass Init method, the return value is 1 if initialization was successful, or zero otherwise.
A scalar string containing the full path and filename of a Shapefile (
.shp) to open. If this file exists, it is opened. If the file does not exist, a new Shapefile object is constructed. You do not need to use IDLffShape::Open to open an existing file when specifying this argument.
.dbxfiles must exist in the same directory for you to be able to open and access the file unless the UPDATE keyword is set.
Any property listed under IDLffShape Properties that contains the word "Yes" in the "Init" column of the properties table can be initialized during object creation using this method. To initialize the value of a property, specify the property name as a keyword set equal to the appropriate property value.
In the following example, we create a new Shapefile object and open the
myshape=OBJ_NEW('IDLffShape', FILEPATH('states.shp', $ SUBDIR=['examples', 'data']))
DBF_ONLY keyword: 5.6