GeoAI and publishing maps

Practise converting an orthomosaic into masks and vectors with SamGeo, check the segmentation against reference data, then prepare layers for the web.

Last updated:

A researcher checks tree and building layers derived from aerial imagery on screen
Concept illustration generated with AI

Exercise M05 uses AI to propose object boundaries from a finished map, after which a person checks them and adds meaning before passing them on as GIS data. This work happens after the flight, on a computer or processing service, and is separate from Edge AI, which must make decisions on board the drone during flight.

Prepare the imagery and define what will be counted

You should be able to use QGIS to open raster/vector data and understand CRS. Prepare an RGB orthomosaic that you have the right to use, with correct coordinates and an area small enough to check every object by eye. Define the target first, such as “roof edges visible in the image” or “crowns that can be separated into individual trees”, because different definitions produce different evaluation results.

Install SamGeo according to the developer's installation guide in a separate environment. Choose dependencies and a runtime that match the actual Windows/Linux system and hardware. Record the package version, model version and name of the weights used. Different model versions may have different requirements and resources. This chapter does not claim to have tested speed or installation on every machine.

From image to mask, and only then to a layer

The GeoTIFF is divided into processing areas, masks are created, checked and corrected by a person, and converted to vectors with a status before publishing

Segmentation segments pixel groups or object boundaries, but a separated mask does not guarantee that it is the object type we want. SAM in automatic mask-generation mode may split roofs, shadows and parts of trees into many pieces. Naming the layer “all buildings” straight away therefore adds a conclusion that the process has not yet proven.

SamGeo supports GeoTIFF imagery, the use of prompts and export to several vector formats. It is a tool that helps preserve the link to coordinates in the workflow, but the geographic meaning and verification status still have to be designed separately. SamGeo project repository

Keep the raw-output layer separate from the checked layer. Use the fields class_label, review_status, reviewer, image_date and model_version so that recipients know where the boundaries came from and who has checked them.

Split large images while preserving coordinates and the independence of the evaluation set

Splitting into tiles helps limit memory, but the origin, pixel size, CRS and extent of each tile must be kept. Cutting into PNG without keeping the coordinate transformation means the masks cannot be reliably placed back on the Earth.

Objects at tile edges may be cut off or counted twice when there is overlap. Define a merging method, such as keeping only the central results of each tile or merging duplicate objects with a recorded rule, then have a person check the seams. The choice of overlap must relate to object size and memory; do not use the same value for every job.

When tuning prompts/thresholds or training a model, separate the development area from the evaluation area as distinct regions before cutting tiles. If neighbouring tiles or parts of the same object are spread across both sets, test results may look good because nearby data has leaked in. For evaluation across genuinely different areas, there should also be an area or time period separate from the tuning work.

Carry out M05 on a computer

  1. Open the orthomosaic in QGIS and clip a small area as a GeoTIFF that still has its CRS and full RGB bands. Define the extents of the tuning area and the evaluation area in advance.
  2. Open the SamGeo automatic mask generation notebook in the installed environment. Use your own GeoTIFF file instead of the sample-map download step, and choose the runtime according to the notebook's requirements.
  3. Record the model version, create masks and export vectors following the example for that version. Check error messages and memory use before increasing the area size.
  4. Open the masks and vectors overlaid on the original image in QGIS. Check at least two image corners and small objects to confirm that the coordinates still match.
  5. Add class and verification status, correct boundaries, remove non-target objects, and merge/split pieces according to the written definition. Keep the raw results separate from the corrected results.
  6. Check the held-out area against the reference annotation. Report both missed objects and extra objects; do not select only the sample images that came out well.

If it cannot run because of insufficient resources, reduce the test area or use a supported runtime according to the guide, and record that limitation. Do not reduce the resolution repeatedly until objects disappear and then compare the results with earlier work without stating the change in input.

Evaluation example: boundary overlap and counting are different things

For two target mask sets, IoU = intersection area / union area . Suppose the reference boundary is 100 m², the AI result is 110 m² and the overlapping part is 80 m²; the union area is 130 m² and IoU = 80/130 ≈ 0.615 This is a synthetic example, not a SamGeo score from the Mygla dataset.

Suppose another task has 10 reference objects, the model outputs 12 and 8 are correctly matched according to the defined criteria; then precision = 8/12 ≈ 0.667 and recall = 8/10 = 0.80. The matching rule must be declared first, such as a minimum IoU and one-to-one matching; otherwise several masks overlapping one object may be counted as multiple successes.

The confidence score or predicted IoU given by the model is not the IoU measured against this task's reference annotation, and a mask with good boundaries does not prove that the object-type label is correct. Report boundary checks and class checks according to the question the data must answer.

Prepare for publishing while preserving the meaning of the data

Keep the analysis version in GeoPackage, then export a checked copy as GeoJSON for small layers. Check the longitude/latitude coordinates, axis order and extent before opening it on the web. Remove unnecessary attributes and retain the credits, image source, date, model version and verification status.

MapLibre GL JS uses GeoJSON as a source and adds a layer to display polygons. The official example shows how to define the source and the layer style; this is the display step and does not perform segmentation or confirm data quality. MapLibre: Add a GeoJSON polygon

Large orthomosaics should be prepared in raster formats and services supported by the viewer, while large vector data may be better suited to vector tiles than loading an entire GeoJSON file. Speed and zooming must be tested on the actual target devices. Keep the full master version, because simplifying boundary vertices for display may change areas if that copy is used for measurement.

Deliverables and limitations that must be disclosed

Deliver the test-area GeoTIFF or a data reference, the raw masks, the checked vectors, the annotation rules, a table of evaluation results and an environment record. The learner passes when the results align with the image, they can explain extra/missing masks, they separate model scores from actual verification scores, and the exported files can be reopened.

The layer to be published must have a clear explanation of colours and status. Check the rights to the imagery, model weights and supporting data separately; a package's license does not cover everything the pipeline uses. If the imagery contains details that should not be made public, prepare results appropriate to the intended audience only.

Return to choosing a map that fits the mission to check whether this layer supports the intended decision, and to the learning path overview to review the links from imagery to deliverables.

References

Documents checked 8 September 2026; example scores are synthetic data and not a benchmark

Used in courses

How to cite this page

Drone Institute, Rangsit University. (2026). GeoAI and publishing maps. In UAS Technology Knowledge Hub (B.Tech.). https://rsu-uat.pk-research.work/en/kb/knowledge/drone-mapping/geoai/

Original from Drone-Hub: https://drone.pk-research.work/knowledge/drone-mapping/geoai/ · © PK-Research