Aller au contenu
getgeolens.com

Analysis

Ce contenu n’est pas encore disponible dans votre langue.

The Analysis panel runs PostGIS geometry operations against the layers already in your map. Open a map in the Map Builder, then click Analysis in the right-hand rail.

There are four operations: buffer, centroid, clip, and dissolve. The first three can draw a preview on the map before you commit to anything. All four can write their result to a new dataset in your catalog.

The Layer dropdown lists the vector layers currently on the map. A layer qualifies when the dataset behind it is vector and has a known geometry type, which leaves out raster layers, VRT mosaics, and DEMs. If the panel tells you to add a dataset layer, the map has no vector layer on it yet.

Analysis reads the dataset behind the layer, not the layer as you see it. A CQL2 filter that hides features on screen does not exclude them from the operation, and neither does the eye icon. To analyze a subset, save that subset as its own dataset first.

Preview runs the operation and returns the first 500 features as a temporary overlay. Nothing is written to the catalog. When the result is cut off at 500, a notice reports the source total so you can see how much the preview leaves out. Clear preview removes the overlay, and so does leaving the map.

Create dataset queues the same operation over every feature and registers the output as a new private dataset you own. It needs the upload and export permissions, so the New dataset name section stays hidden for accounts missing either one. The new dataset counts against your dataset quota.

Dissolve is an aggregate rather than a per-feature transform, so it has no preview shape. Its only button is Create dataset.

Buffer grows each feature by a fixed distance and returns the resulting polygon. Enter the distance in meters, kilometers, feet, or miles, and the panel converts it before sending. The ceiling is 100 km.

Buffering is geodesic. GeoLens casts the geometry to geography first, so 500 meters means 500 meters on the ground whether the feature sits on the equator or in northern Norway. A buffer computed in degrees would come out distorted at high latitude, because a degree of longitude covers less ground the further you get from the equator.

Centroid replaces each feature with a single point at its center of mass, one point per input feature.

The center of mass of a concave shape can fall outside the shape. The centroid of a horseshoe-shaped parcel lands in the gap. This is the ordinary ST_Centroid definition rather than a guaranteed-inside point, which matters if you plan to join the output back to whatever contains it.

Clip keeps the parts of each feature that fall inside a mask. There are two ways to supply the mask.

Draw clip area puts the map into polygon-drawing mode. Click to place vertices, double-click to finish. The polygon stays on screen afterwards so you can see what you are about to clip against. Drawing needs a pointer.

Or clip to a layer takes the mask from another polygon layer already on the map, and combines every polygon in it into a single mask. Use this when the mask is real data rather than a sketch, or when you are working without a mouse.

Clipped output keeps the dimension of its source: clipping polygons gives you polygons, clipping lines gives you lines. Features that only graze the mask boundary meet it at a lower dimension, and those are dropped rather than returned as stray fragments.

Dissolve merges features into one geometry. With no group field, the whole layer collapses into a single row. Pick a Group by field and you get one row per distinct value, so dissolving parcels by zoning returns one multipolygon per zoning class.

Dissolve output carries the group column and a generated source_count, the number of input features behind that row. Every other attribute is dropped, since there is no correct answer for the owner of 4,000 merged parcels.

Buffer, centroid, and clip copy every attribute column from the source to the output, so the saved dataset still joins back to the original on whatever key it already had. Dissolve is the exception described above.

The output is an ordinary vector dataset. Style it in the builder, export it in the same formats as anything else in the catalog, and serve it through the OGC API endpoints. It starts private, and you change that from the dataset’s Access tab.

GeoLens drops rows that produced nothing before it registers the dataset, so an operation over a layer with some empty geometries saves fewer rows than the source has. If an operation produces no features at all, the job fails rather than registering an empty dataset.

The panel shows a status line while the job runs. A queued job says so and names what it is waiting for, then the line moves through Creating dataset… and Saving the dataset… to Dataset created, which arrives with an Add to map button next to it.

Analysis is deliberately queued below interactive uploads, so on a busy instance a job can sit at Queued for a while. That is the queue working as intended: the job is waiting for a free worker.

You can run one analysis job at a time. Create dataset stays disabled while one is in flight, and the API answers a second request with a 429. The result still reports if you close the panel or navigate away while it runs.

Administrators can see what any job was asked to do. Every analysis run records its parameters against the job row, and Admin → Jobs shows them: the operation, the source dataset, the output title you typed, and whichever of buffer distance, dissolve group field, and clip-mask source applies. This is what makes a failed run diagnosable, since analysis-buffer failed on its own says very little. A clip mask you drew on the map is recorded only as having been drawn — the polygon itself is not stored, because it can run to kilobytes.

LimitValue
Buffer distance100 km
Preview result500 features
Drawn clip area5,000 vertices
Clip mask layer1,000 features
Source features, dissolve250,000
Source features, buffer500,000
Output dataset size2 GB
Analysis jobs per user1 at a time

Centroid and clip carry no source-feature ceiling, because neither can produce more data than it consumes. Buffer and dissolve both can: buffer inflates every geometry it touches, and dissolve holds union state in memory that grows with the input.

The distance, mask, and source-feature limits are checked before the job is queued, so you get an immediate error naming the limit you hit. Output size is the exception, since nothing can measure the result until it exists. That one fails the job partway through and drops the partial table.

If your administrator has enabled AI features, you can ask the chat for a buffer or a centroid in plain language: “buffer the schools by 500 meters”, or “show the center point of each parcel”. The answer arrives as the same temporary overlay the Preview button produces.

Chat handles buffer and centroid only. Clip needs a mask that only the panel can supply, and dissolve has nothing to preview. While a chat preview sits on the map, its badge offers Save as dataset…, which opens the Analysis panel with the operation and distance already filled in.

Two endpoints back the panel:

POST /api/datasets/{dataset_id}/analysis/preview/
POST /api/datasets/{dataset_id}/analysis/materialize/

preview is synchronous and returns a GeoJSON FeatureCollection under the same 500-feature cap. materialize returns a job id. Poll GET /api/jobs/{job_id} until the status reads complete, then take dataset_id off the response.

Both require read access to the source dataset. materialize also requires the upload and export permissions: it creates a dataset, and that dataset carries the source’s attributes, so it is gated like a download as well as like an upload. A role holding only one of the two gets a 403. Request and response schemas live in the API reference.