Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Name

sflayer --- Manage Simple Features Layer

...

Return the geometry of the given feature as well-known text. The fid argument is feature-id.

tokml fid

Return the geometry of the given feature as KML. The fid argument is feature-id.

getfids

 Return the ids of all features in the layer as a Tcl list. If the spatial or attribute filters are set the feature set will be filtered accordingly.

...

Return all column (field) names in the layer as a Tcl list.

getfield fid fieldname

Return value of given field in the feature identified by feature id fid.

setfield fid fieldname value

Set field value in column (field) given by fieldname in feature identified by given feature id fid.

...

Set spatial filter to given rectangle. Subsequent calls to getfids, resetreading, and getnextfid will only return features that geometrically intersect with the given rectangle. If the rectangle coordinates are omitted the spatial filter is reset.

sflayer setattributefilter [filter expression]

Filter features by expression. Subsequent calls to getfids, resetreading, and getnextfid will only return features that pass the filter expression. The expression is a WHERE expression similar to what is used in SQL. For example, if the layer contain columns 'state' and 'area' the expression 

...

To reset the attribute filter omit the filter expression.

sflayer resetreading

Reset the feature cursor used for reading feature ids. The next call to getnextfid will return the id of the first feature id in the layer. Note that spatial filtering and attribute filtering still applies.

...

No Format
sflayer resetreading set fid [sflayer getnextfid] while { $fid != "" } { puts "Feature id is $fid" set fid [sflayer getnextfid] }

 

sflayer getnextfid

Return the next feature id and advance the feature cursor to the next feature ,as permitted by the spatial filtering and attribute filtering. See resetreading.

sflayer isvalid fid

Returns true only if the geometry of the feature with the given feature id is valid.

sflayer issimple fid

Returns true only if the geometry of the feature with the given feature id is simple according to OGC definitions.

sflayer isring fid

Returns true only if the geometry of the feature with the given feature id is a (closed ) ring.

sflayer isnull fid

Returns true only if the geometry of the feature with the given feature id is null.

sflayer getgeometryname fid

Return the geometry type of the given feature. The type corresponds to the type terminology used in well-known text representations, like POINT, POLYGON, etc.

sflayer getdimension fid

Return the dimension of the geometry of the given feature. The values are 0 for points, 1 for lines, and 2 for polygons.

sflayer getenvelope fid

Return the spatial envelope of the geometry of the given feature as a Tcl list : { xmin ymin xmax ymax }.

sflayer area fid

Return the area of the given feature in the unit of the spatial reference.

sflayer segmentize fid length

Modify the geometry such it has no segment longer then the given distance.

sflayer deletefeature fid

Delete the given feature

sflayer createfield fid name type

Create a new field in the layer. A field is similar to a column. The possible types are : integer, real, string, binary, date, time, datetime.

...