Description of basic scripts |
|
|
Shift objects by specified offsets dx, dy (moveobjects.py : MoveObjects)
Before executing the task, select the objects on the map to be shifted, or choose a single object in the Map Object Description Query dialog. When running the command, enter the offset in meters along the X and Y axes and click Execute. The selected objects or the chosen object will be shifted and updated on the map. A pop-up message will indicate the number of processed objects.
Add H value from elevation matrix (map3d.py : AddHValue) Before executing the task, select the objects on the map for which the elevation value from open matrices will be set in their coordinates, or choose a single object in the "Map Object Description Query" dialog. After updating the coordinates, a pop-up message will indicate the number of processed objects.
Delete H value from object metrics (map3d.py : DeleteHValue) Before executing the task, select the objects on the map for which the elevation value will be removed from their coordinates, or choose a single object in the Map Object Description Query dialog. After updating the coordinates, a pop-up message will indicate the number of processed objects.
Calculate distance to object and write to its semantics (savedistancetosemantic.py : DistanceToSemantic)
Before executing the task, select the objects on the map for which the distance to the chosen object will be determined, and the value will be written to the specified semantic. After selecting the objects to update, choose the object in the "Map Object Description Query" dialog to whose center the distance from the nearest point of each object will be calculated. When running the command, select the semantic to which the calculated distance will be written. After execution, a pop-up message will indicate the number of processed objects.
Determine maximum absolute height among selected objects (findmaximumheight.py : SearchForTheMaximum) Before executing the task, select the objects on the map among which the object with the maximum absolute height in semantic code 4 will be determined. After execution, a pop-up message will indicate the found maximum absolute height and the object number.
Build rectangular grid on the map (mapgrid.py : BuildGrid)
When executing the task, enter the grid step in mm at the base map scale. The grid is built according to the map extents as graphic objects—thin black lines. After execution, a pop-up message will indicate the number of drawn lines.
Edit coordinate list in tabular form (editpoints.py : EditPoints) Before executing the task, select a single object on the map in the Map Object Description Query dialog. After execution, the Map Object Metric Editing dialog will open, designed for keyboard input of the object's metric description in tabular form.
Recalculate height in semantics to feet or meters (altitudemetfeet.py : ConvertSemanticAltitude)
Before executing the task, select the objects on the map for which the height value in the specified semantic will be recalculated, or choose a single object in the Map Object Description Query dialog. When executing the task, select the input semantic, the output semantic where the conversion result will be written, and choose the conversion type: from meters to feet or from feet to meters. After execution, a pop-up message will indicate the number of processed objects.
Cut a substring from semantic (cuttext.py : CutText)
Before executing the task, select the objects on the map for which a fragment of the original string in the specified semantic will be cut, or choose a single object in the Map Object Description Query dialog. When executing the task, select the input semantic and specify the start and end positions for substring removal. The remaining part will be saved in the same semantic. After execution, a pop-up message will indicate the number of processed objects.
Set label case (setregister.py : SetLabelsRegister)
Before executing the task, select label objects on the map for which the text case will be set (uppercase or lowercase letters), or choose a single object in the Map Object Description Query dialog. When executing the task, select the text transformation type: "Abc", "ABC", or "abc". If the label text contains a reference to a semantic in the form "#NNNN", the transformation will be applied to the corresponding semantic. After execution, a pop-up message will indicate the number of processed objects.
Calculate area of selected objects (getobjectsarea.py : GetObjectsArea) Before executing the task, select the objects on the map for which the area will be calculated, or choose a single object in the Map Object Description Query dialog. After execution, a pop-up message will indicate the number of found objects and their total area.
Save object coordinates in cm to text file (saveobjectpoint.py : SaveObjectPoints) Before executing the task, select a single object in the Map Object Description Query dialog. When executing the task, select the file to which the object's coordinates will be written, rounded to two decimal places.
Save list of boundary sections in populated area to text file (saveboundary.py : SaveBoundaryList) When executing the task, select the file to which lines with the map sheet name (nomenclature) and unique object numbers will be written. The script iterates through all objects with the "Land Category" semantic (code 1018 from classifier survey.v6.rsc) with value 2 (Populated area lands) and searches for objects with the "Land Category" semantic (code 1018) with any other value (sections not part of populated areas). The numbers of found objects are saved to the file. After execution, a pop-up message will indicate the number of found objects.
Highlight boundary sections in populated area on map (selectboundary.py : SelectBoundary) The task iterates through all objects with the "Land Category" semantic (code 1018 from classifier survey.v6.rsc) with value 2 (Populated area lands) and searches for objects with the "Land Category" semantic (code 1018) with any other value (sections not part of populated areas). The found objects are highlighted on the map. After execution, a pop-up message will indicate the number of found objects.
Import folder with MIF/MID files (miftomap.py : MifFolderToMap) When executing the task, select the folder containing MIF/MID format files, choose the name of the map file to be created, and the name of the RSC classifier file with which the map is created. After execution, a pop-up message will indicate the success or failure of the task.
Save maps to TIF (sitxtotif.py : SitxToTif) When executing the task, select the folder containing vector maps in SITX format. The script iterates through all maps in the folder and saves the map image at the base scale to a TIF file, which has the same name as the map file with the ".tif" extension added. After saving each map image, a pop-up message with the map name is displayed.
Find minimum distances between map objects (mindist.py : CalcMinDistances)
To execute this task, the set of open vector maps must include a road graph map containing arcs (linear object with code 5557) and nodes created using the road25.rsc or service.rsc classifier. When executing the task, select the first map (Map A) from the list of open documents in the project, from whose objects routes are built, and the second map (Map B), to whose objects routes are built via the road graph. For maps A and B, specify the semantics that identify the objects (e.g., cadastral number, address, GUID, etc.). After clicking Execute, specify the CSV filename where the identifiers of objects from maps A and B and the shortest distance between them via the road graph will be written. After execution, a pop-up message will indicate the number of calculated routes. |