Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danizd/geoviable/llms.txt

Use this file to discover all available pages before exploring further.

If you already have a parcel boundary in a digital format, you can skip manual drawing and load it directly through the FileUploader component in the sidebar. GeoViable accepts the five most common spatial file formats used in land planning workflows in Spain. All parsing happens entirely in the browser — your file is never sent to the server just for format conversion, which means the upload step works offline and produces no network latency.

Supported file formats

FormatExtensionNotes
GeoJSON.geojsonRFC 7946, coordinates must be in WGS84 (EPSG:4326)
KML.kmlStandard Keyhole Markup Language; Polygon placemarks processed; LineString placemarks accepted as a fallback
KMZ.kmzCompressed KML — a ZIP archive containing a .kml file
Shapefile.zipZIP archive containing at minimum .shp, .dbf, and .shx files
DXF.dxfOnly closed LWPOLYLINE and POLYLINE entities are processed
Maximum file size: 5 MB. Files exceeding this limit are rejected before any parsing begins.
Shapefiles must be packaged as a .zip archive. The ZIP must contain the .shp, .dbf, and .shx component files at minimum. A .prj file is recommended so the coordinate system is known, though GeoViable assumes WGS84 if the .prj is absent. Do not upload the .shp file alone — it will not be recognized.
DXF support is limited to closed LWPOLYLINE and POLYLINE entities only. Open polylines, individual line segments (LINE), arcs (ARC), splines, circles, and all other DXF entity types are silently ignored during parsing. If your DXF file does not contain at least one closed polyline, GeoViable will display the error “El archivo DXF no contiene polilíneas cerradas (LWPOLYLINE/POLYLINE).” and no polygon will be loaded.

How to upload a file

The FileUploader provides two equivalent methods:
  1. Drag and drop — drag your file from your file manager or desktop and drop it anywhere inside the dashed drop zone labelled “Arrastra un archivo aquí o haz clic para seleccionar”.
  2. Click to browse — click anywhere on the drop zone to open a native file picker dialog. The accepted extensions (.geojson, .json, .kml, .kmz, .zip, .dxf) are pre-filtered in the dialog.
After you select or drop a file, a format badge (e.g. .GEOJSON, .DXF) appears below the drop zone alongside the file name, confirming which parser will be used.

Client-side parsing flow

GeoViable detects the file format from its extension and routes it to the appropriate parser. No server round-trip is needed for this step.
File dropped / selected


  Detect extension
  ┌─────┬──────┬──────┬─────┬──────┐
  │.geojson│.kml│.kmz │.zip │.dxf  │
  └──┬──┴──┬─┴──┬──┴──┬┴────┴──┬───┘
     │     │    │     │        │
     ▼     ▼    ▼     ▼        ▼
  JSON  DOMParser JSZip shpjs  dxf-parser
  .parse kmlTo   →KML  (lazy) (lazy)
         GeoJSON parse
         (internal)

              └──────────────────┐

                         validateGeoJSONGeometry()
                         (Turf.js area + vertex count)

                         ┌───────┴───────┐
                         │ valid         │ invalid
                         ▼               ▼
                   Paint on map    Error toast
                   + fitBounds
The parsers for KMZ (JSZip), Shapefile (shpjs), and DXF (dxf-parser) are lazy-loaded — they are only fetched from the CDN the first time a file of that type is uploaded, keeping the initial page load lightweight.

Parser details by format

FormatLibraryBehaviour
.geojson / .jsonNative JSON.parse()Direct parse; accepts Feature, FeatureCollection, or raw Polygon/MultiPolygon geometry
.kmlBrowser DOMParser + internal converterReads <Polygon> <coordinates> elements from <Placemark> tags, including inner boundary holes
.kmzJSZip → extract .kml → DOMParserOpens the ZIP, locates the first .kml entry, then applies the KML parser
.zip (Shapefile)shpjsReads the SHP + DBF + PRJ from the ZIP buffer in one call via ArrayBuffer
.dxfdxf-parserParses all entities; only LWPOLYLINE / POLYLINE with shape: true or first-equals-last vertices are kept

Validation applied after parsing

Once the file is parsed into GeoJSON, the same validation rules that apply to drawn polygons are enforced:
ConstraintLimitError message
Polygon presentAt least one polygonEl archivo no contiene un polígono válido
Single polygonExactly one featureSolo se permite un polígono por análisis
Maximum area100 km²El polígono excede el área máxima permitida (100 km²)
Maximum vertices10,000El polígono tiene demasiados vértices (máximo 10.000)
Geographic boundsGalicia bounding boxEl polígono se encuentra fuera de los límites de Galicia
When validation passes, the polygon is painted on the map with the same #334155 border and 0.15 fill opacity used for drawn polygons, fitBounds is called to zoom to the parcel, and the area is shown in the sidebar.

Example GeoJSON input

The simplest valid input: a Feature object with a Polygon geometry in WGS84 coordinates [longitude, latitude].
{
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-8.4215, 43.3712],
        [-8.4189, 43.3712],
        [-8.4189, 43.3695],
        [-8.4215, 43.3695],
        [-8.4215, 43.3712]
      ]
    ]
  }
}

Build docs developers (and LLMs) love