Processes, accessed from the Create tab, provide the ability to combine SIS functionality into defined workflows. This is useful in the desktop, but processes, i.e. Process and ProcessItem can also be accessed and run through the HTTP API. This allows either standard or custom processes to be run on demand, providing advanced geospatial analysis and manipulation.
The screenshot above shows the buffer process in the desktop. You can create a buffer, referencing this process using the following request.
The method must be PATCH and the overlay should be editable. The request will create a buffer of 105 units (usually metres, but dependent on the CRS in use) on all items in overlay 7:
…./Overlays/7/Items.json?process=….
http://ccd616:4626/GeognoSIS/8.0/Sessions/61abbc85-388a-4e23-b344-4489f3011f0a/Map/Overlays/7/Items.json?process={"Operation":"Item.Buffer","PropertyMap":{"_radius@":105}}
To create a buffer on one item in overlay 7, use the following:
…./Overlays/7/Items/I1.geojson?process=….
http://ccd616:4626/GeognoSIS/8.0/Sessions/61abbc85-388a-4e23-b344-4489f3011f0a/Map/Overlays/7/Items/I1.geojson?process={"Operation":"Item.Buffer","PropertyMap":{"_radius@":105}}
You need to be aware that when running processes, the source is always left unchanged.
Fort example, if you run the following request to intersect two area features:
…/Map/Overlays/7/Items.json?process={"Operation":"Item.Intersect"}
the intersect operation will not delete the original features. After running the process the overlay has two original items and an intersected area (item). You will need to use the DELETE verb to remove original items if they are not required.
Any processes that you create in SIS and save are stored in a Named Object Library (NOL). These can then be accessed by the HTTP API. A NOL can be added to the installation folder of GeognoSIS, usually C:\Program Files\Cadcorp GeognoSIS 8.0\Libraries, which is then automatically loaded into every session.
Alternatively, you can load the NOL in a session using this request. This creates a usable NOL file into the session from it’s location at C:\temp\test.nol
http://ccd616:4626/GeognoSIS/8.0/Sessions/43d3661d-2721-4ec7-a4d8-3d86df42f13f/Libraries.json?
path=c:\\temp\\test.nol
Result
{"Result":"Created",
"View":"Libraries/test.nol.json"}
You can check the Libraries available to you by using a GET request.
http://ccd616:4626/GeognoSIS/8.0/Sessions/43d3661d-2721-4ec7-a4d8-3d86df42f13f/Libraries.json
Result
{"Data":["Libraries/(temporary).json",
"Libraries/(standard).json",
"Libraries/test.nol.json"],
"Up":"../43d3661d-2721-4ec7-a4d8-3d86df42f13f.json",
"Representations":"Libraries",
"Operations":"Libraries.json?"}
You can see that the new library is included in the list. From here you can traverse the contents of the library further.
Moving through the Library structure you can find the ObjectTypes stored there, including Processes using Libraries/test.nol/ObjectTypes/Process/
Running the following GET request will return the JSON structure of the process:
http://ccd616:4626/GeognoSIS/8.0/Sessions/d5b3d66a-b3ac-4eaa-810f-761937c1f408/
Libraries/test1.nol/ObjectTypes/Process/tesing.bufferradiusitem.json
Response
{"Data":{"Operations":[{"Operation":"Item.Buffer","Properties":{"PropertyMap":{"_radius@":"BufferRadius&"}}}]},
"Up":"../Process.json","Representations":"tesing.bufferradiusitem","Operations":"tesing.bufferradiusitem.json?"}
The JSON for the process is defined here as: {"_radius@":"BufferRadius&"}
To use this in a subsequent request, you need to encode the variable type, in this case &: {"_radius@":"BufferRadius%26%"}
The process methods listed below are described using their JSON in the following pages. Click on the titles or the individual processes to go to that page.
Copy | Copies an existing Item |
Decompose | Breaks down Items with complex geometry into separate Items |
Filter | Filter Items using an expression |
Group by | Group Items using an expression |
Sort | Sort Items by a value |
Create box | Creates a rectangular Polygon, around a centre point |
Create ellipse | Creates an elliptical Polygon |
Create line (bearing/distance) | Creates a LineString from a bearing and distance |
Create point | Creates a Point Item |
Create points in Polygon | Creates random points inside a Polygon |
Create points on LineString | Creates random points along a LineString |
Create sector (bearing/angle) | Creates a sector Polygon from a bearing and angle |
Create sector (start/end) | Creates a sector Polygon from a start and end angle |
Join points | Joins the origin points of Items together into a LineString Item |
Join points (advanced) | Joins the origin points of Items together into one or more LineString Items |
Boundary | Gets the boundary of an Item. |
Clip inside | Clips parts of source Items that are inside a clipping Item from another Overlay |
Clip outside | Clips parts of source Items that are outside a clipping Item from another Overlay |
Close | Closes any open geometry, joining the end to the start |
Convex hull | Creates a convex hull Polygon around an Item |
Envelope | Creates an envelope Polygon around the extents of an Item |
Explode parts | Explodes each 'part', of an Item into a separate LineString |
Explode segments | Explodes each 'segment' |
Explode vertices | Explodes each vertex of an Item into a separate Point |
Facet | Facets curved geometry segments into straight geometry |
Fill | Fills the boundary of an Item |
Join LineStrings | Joins LineString Items together to make a longer LineString Item, within a tolerance |
Move | Moves an Item in X and/or Y and/or Z |
Remove interior loops | Removes interior loops (holes and islands) from Polygons, leaving only exterior loops |
Reverse geometry | Reverses the geometry of an Item |
Rotate | Rotates the geometry of an Item about a hook point |
Scale | Scales the geometry of an Item about a hook point |
Smooth (mid-points) | Smoothes the geometry of an Item, keeping segment mid-points fixed |
Smooth (vertices) | Smoothes the geometry of an Item, keeping vertices fixed |
Strip geometry | Strips the geometry of an Item, leaving an Empty Item |
Generalise(Douglas-Peucker N) | Generalises geometry using a variation of the Douglas-Peucker algorithm that is limited by the number of output points |
Generalise(Douglas-Peucker) | Generalises geometry using the Douglas-Peucker algorithm |
Generalise(Perpendicular Distance) | Generalises geometry using the Perpendicular Distance algorithm |
Generalise (Radial Distance) | Generalises geometry using the Radial Distance algorithm |
Generalise (Reumann-Witkam) | Generalises geometry using the Reumann-Witkam algorithm |
Remove duplicates (by expression) | Removes duplicate items based on an expression |
Remove duplicates (by geometry) | Removes duplicate items based on their geometry |
Remove self-intersections | Removes self-intersections, e.g. a bow-tie |
Remove short segments | Removes segments shorter than a tolerance |
Remove spikes | Removes vertices that cause a spike |
Remove straight segments | Removes vertices between straight, or near straight segments |
Simplify | Simplifies the geometry of an item, so that it matches the OGC 'simple' form |
Remove all attributes | Removes all attributes from an Item |
Remove attribute | Removes an attribute from an Item |
Set property | Sets a property on an Item |
Set styles | Sets styling information on an Item |
Strip styles | Strips all styling information from an Item. Returns Brush, Pen and Symbol Items to "By Overlay" |
Buffer | Creates a buffer around an Item |
Cluster | Clusters Items together within regular, rectangular grid cells |
Create Thiessen Polygons | Creates Thiessen Polygons of influence around the hook point of Items |
Dissolve | Merges Items based on attribute values. |
Geodetic buffer | Creates a 'geodetic' buffer around an Item |
Intersect | Combines the Items using the intersect boolean operation |
QZone buffer | Creates a QZone buffer around an Item |
Subtract | Combines the Items using the subtract boolean operation |
Symmetric difference | Combines the Items using the symmetric difference boolean operation |
Union | Combines the Items using the union operation |
Viewshed (as Grids) | Creates 'Viewshed' Grids from the Item origin over source Grid Items from another Overlay |
Viewshed (as QZone) | Creates a'Viewshed' QZone from the Item origin over source Grid Items from another Overlay |
Viewshed (as binary Grids) | Creates 'Viewshed' Grids from the Item origin over source Grid Items from another Overlay, containing only the cell values 1 (in Viewshed) and 0 (not in Viewshed) |
Compress | Compresses a bitmap |
Convert to grayscale | Converts a colour bitmap to a grayscale bitmap |
Convert to sepia | Converts a colour bitmap to a sepia bitmap |
Crop | Crops a bitmap |
Create Terrain Ruggedness Index | Creates a Terrain Ruggedness Index map |
Create Topographic Position Index | Creates a Topographic Position Index map |
Create aspect | Creates an Aspect map |
Create contours (fixed intervals) | Creates contour LineString Items from a Grid, at fixed intervals |
Create contours (fixed levels) | Creates contour LineString Items from a Grid, at fixed levels |
Create hillshade | Creates a shaded relief map from a Grid |
Create points | Explodes a Grid Item into one Point Item per Grid cell |
Create polygon coverage | Creates a coverage of Polygon Items from a Grid |
Create polygons | Explodes a Grid Item into one Polygon Item per Grid cell |
Create roughness | Creates a Roughness map |
Create slope | Creates a Slope map |
Set cell value | Sets the value of all Grid cells that match a comparison against the 'from' value to the 'to' value |
MapQuest Open | Connects to the MapQuest Open Geocoding service |
Microsoft Bing Maps | Connects to the Microsoft Bing Maps geocoding service |
OS (GB) Code-Point Open | Searches OS (GB) Code-Point Open data, by postcode |
OS (GB) National Grid Reference | Matches search strings against OS (GB) National Grid References |
OS (GB) National Grid Reference (Jersey) | Matches search strings against OS (GB) National Grid References for Jersey |
Remove all attributes | Removes all attributes from an Item |
Strip styles | Strips all styling information from an Item |
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).