s = geometry_name.getProperty(property_name);
The
Geometry.getProperty function returns a string containing the current value associated with the
Geometry object's property specified by the string expression
property_name. If a Geometry object contains multiple features, the function returns the value of the first feature that contains a value for
property_name. Property names are case sensitive.
Property values may be set using the
Geometry.setProperty function. When reading a GeoJSON file using the
Geometry.load function, property names and values are read from the properties section of GeoJSON features.
The function returns a string with the property information. If no feature in the geometry has a value for the property, a blank string is returned.
// Load geometry from a file
Geometry geom;
geom.load("geom.geojson");
// Read the name property
string feature_name = geom.getProperty("name");
errmsg("This feature is named %s", feature_name);