-
Notifications
You must be signed in to change notification settings - Fork 1
Arc to grid
mtbeek32 edited this page Dec 6, 2023
·
19 revisions
Configuration examples Arc to grid
This example is used to make a grid representation of an arc, see the figure:
In this figure the red arc is presented in the grid domain, the dark cells are the cells through which the arc passes.
A dyna_point function is used to split up the lines in a set of points. Use as distance argument of the dyna_point function half the grid size of the grid domain(or less) if you want all cells passed through by the arc in the grid representation.
container line2grid { unit<uint32> arc: StorageName = "%SourceDataDir/OSM/roads.shp", StorageType = "gdal.vect" { attribute<geometries/rdc> geometry (arc) ; attribute<uint8> wegtype; } unit<uint32> segments := arc2segm(arc/geometry) { attribute<uint8> wegtype := arc/wegtype[sequence_rel]; } unit<uint32> dyna_point := dyna_point_with_ends(segments/point, segments/nextpoint, 50f) { attribute<griddomain_100> griddomain_100_rel := point[poly2grid/griddomain_100]; attribute<uint8> wegtype := segments/wegtype[sequence_rel]; } attribute<dyna_point> dyna_point_rel (griddomain_100) := invert(dyna_point/griddomain_100_rel); attribute<uint8> wegtype (griddomain_100) := modus(dyna_point/wegtype, dyna_point/griddomain_100_rel); }
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.