b = geometry_name.save(filename);
The
Geometry.save function saves the vector data (points, lines, and polygons) in the
Geometry object named
geometry_name to the file specified by the string expression
filename. The data is saved in
GeoJSON format.
The function returns a logical value of 1 (true) if the file was successfully saved or 0 (false) otherwise.
// Declare a geometry
Geometry outline;
// Have the user walk the outline of a polygon
if outline.walkPolygon() then
// Save the outline to a GeoJSON file
outline.save("outline.geojson");
endif;