{"openapi":"3.1.0","info":{"title":"Level2 Geo API","description":"Slovenia Geocoding and LiDAR Point Cloud, DEM processing, Terrain analysis, Geometry draping, Building information and modelling. See <a href=\"/changelog\">What's New</a>.<br/> Copyright 2026 <a href=\"https://www.level2.si/\">Level2</a>.","version":"1.5.3"},"paths":{"/auth/token":{"post":{"tags":["Auth"],"summary":"Issue JWT access token","operationId":"issue_token_auth_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tilesets":{"get":{"tags":["Tilesets"],"summary":"List all tilesets","description":"Return all registered tilesets ordered by creation date (newest first).\n\n**Response** — JSON object:\n\n| Field | Type | Description |\n|---|---|---|\n| `attribution` | string | Service and data-provider attribution |\n| `items` | array | Tileset objects |","operationId":"get_tilesets_tilesets_get","responses":{"200":{"description":"Tileset objects ordered by creation date (newest first) with top-level attribution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TilesetsResponse"}}}},"503":{"description":"Database temporarily unavailable"}}}},"/tiles":{"get":{"tags":["Tiles"],"summary":"List tile coverages","description":"Return all tile polygons for a tileset as a **GeoJSON FeatureCollection**.\n\nEach `Feature` carries these properties:\n\n| Property | Type | Description |\n|---|---|---|\n| `name` | string | Tile identifier (matches tileindex grid cell) |\n| `tileset` | string | Tileset name |\n| `acquired_date` | string or null | Acquisition date/period label |","operationId":"list_tiles_tiles_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"tileset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"**Optional.** Tileset name (e.g. `clss_23_25`). When omitted the most recently created tileset is used. Use `GET /tilesets` to list available names.","examples":["clss_23_25"],"title":"Tileset"},"description":"**Optional.** Tileset name (e.g. `clss_23_25`). When omitted the most recently created tileset is used. Use `GET /tilesets` to list available names."}],"responses":{"200":{"description":"GeoJSON FeatureCollection of tile polygons with top-level attribution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileFeatureCollection"}}}},"404":{"description":"No tilesets found in the database"},"503":{"description":"Database temporarily unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tiles/search":{"post":{"tags":["Tiles"],"summary":"Find tiles intersecting a geometry","description":"Return tile polygons whose tileindex cell **intersects** `geometry`.\n\n**Response** — GeoJSON FeatureCollection. Each `Feature` carries these properties:\n\n| Property | Type | Description |\n|---|---|---|\n| `name` | string | Tile identifier matching the tileindex grid cell name |\n| `tileset` | string | Tileset this tile belongs to |\n| `acquired_date` | string or null | Acquisition date/period label, if recorded |","operationId":"search_tiles_tiles_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileSearchRequest"}}},"required":true},"responses":{"200":{"description":"GeoJSON FeatureCollection of matching tile polygons with top-level attribution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TileFeatureCollection"}}}},"413":{"description":"Input polygon area exceeds the configured limit"},"404":{"description":"No tilesets found or no tiles match the geometry"},"503":{"description":"Database temporarily unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/clip/pointcloud":{"post":{"tags":["Clip"],"summary":"Clip and filter Point Cloud to polygon (COPC LAZ 1.4)","description":"Clip and filter Point Cloud(s) covering **geometry** and return a COPC LAZ file (LAS 1.4).\n\nPDAL selects point format 8 when the input includes Infrared, format 7 for RGB-only\ninput, or format 6 otherwise.\n\n**`categories` — ASPRS LAS classification codes**\n\n| Code | Class |\n|---|---|\n| 1 | Unclassified |\n| 2 | Ground |\n| 3 | Low vegetation |\n| 4 | Medium vegetation |\n| 5 | High vegetation |\n| 6 | Building |\n| 7 | Noise |\n| 9 | Water |\n| 17 | Bridge deck |\n\nWhen `categories` is omitted every point inside the polygon is returned regardless of class.","operationId":"clip_point_cloud_clip_pointcloud_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipRequest"},"examples":{"buildings_only":{"summary":"Clip building points only","value":{"geometry":"POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))","tileset":"clss_23_25","categories":[6]}},"all_points":{"summary":"Clip all point classes","value":{"geometry":"POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))","tileset":"clss_23_25"}}}}},"required":true},"responses":{"200":{"description":"COPC LAZ file (LAS 1.4). PDAL writes point format 8 when input includes Infrared, format 7 for RGB-only input, or format 6 otherwise.","content":{"application/json":{"schema":{}},"application/octet-stream":{}}},"409":{"description":"Pointcloud is missing for one or more intersecting tiles; import is required"},"404":{"description":"No tiles found for the requested geometry/tileset"},"413":{"description":"Request exceeds configured limits:\n- Input polygon area exceeds the configured area limit.\n- Generated clip output exceeds the format size limit."},"422":{"description":"Clip produced zero points (try relaxing category filter)"}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/clip/dem":{"post":{"tags":["Clip"],"summary":"Clip DEM to polygon","description":"Clip DEM tile(s) covering **geometry** and return GeoTIFF, LAS/LAZ 1.2 point format 0, or TXT output.","operationId":"clip_dem_clip_dem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemClipRequest"},"examples":{"clip_dem_patch":{"summary":"Clip DEM to polygon and return GeoTIFF","value":{"geometry":"POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))","tileset":"clss_23_25","output_format":"geotiff","resolution_m":0.5}},"clip_dem_txt":{"summary":"Clip DEM to polygon and return XYZ text","value":{"geometry":"POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))","tileset":"clss_23_25","output_format":"txt","resolution_m":0.5}},"clip_dem_laz":{"summary":"Clip DEM to polygon and return compressed LAS 1.2 point format 0","value":{"geometry":"POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))","tileset":"clss_23_25","output_format":"laz","resolution_m":0.5}},"clip_dem_las":{"summary":"Clip DEM to polygon and return uncompressed LAS 1.2 point format 0","value":{"geometry":"POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))","tileset":"clss_23_25","output_format":"las","resolution_m":0.5}}}}},"required":true},"responses":{"200":{"description":"GeoTIFF, TXT, or LAS/LAZ 1.2 point format 0 output containing DEM values inside the requested polygon","content":{"application/json":{"schema":{}},"image/tiff":{},"text/plain":{},"application/octet-stream":{}}},"404":{"description":"No tiles found for the requested geometry/tileset"},"413":{"description":"Request exceeds configured limits:\n- Input polygon area exceeds the configured area limit.\n- Generated clip output exceeds the format size limit."},"422":{"description":"Clip failed or produced an empty DEM"}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/geometry/drape":{"post":{"tags":["Geometry"],"summary":"Drape geometry onto DEM","description":"Sample terrain elevation (DEM) at every vertex of **geometry** and return\nthe geometry as a 3D WKT string.\n\n**Smoothing:** Each line's interpolated elevations are smoothed independently\nusing a Savitzky–Golay-style local quadratic least-squares fit against distance\nalong the line. The window is **5 m wide** (normally 2.5 m on each side), shifts\nat open-line ends, and wraps around closed lines. A window needs at least five\ndistinct vertex positions; otherwise its elevations remain unsmoothed. Points\nand polygon rings are not smoothed.\n\nAll coordinates stay in EPSG:3794 — no reprojection is performed. WKT coordinates\nare rounded to 3 decimal places. Statistics and slopes are calculated from\nunrounded smoothed elevations and coordinates, then rounded to 2 decimal places,\nso they may not be exactly reproducible from the returned rounded WKT.\n\n**Response** — JSON object:\n\n| Field | Type | Description |\n|---|---|---|\n| `geometry` | string | Output WKT Z string with Z injected at every vertex |\n| `offset` | number | Input Z offset (metres) applied to elevations |\n| `segmentize_percent` | number \\| null | Input densification percentage, or `null` when omitted |\n| `segmented_vertices_added` | integer | Number of vertices introduced by densification before draping |\n| `distances` | number[] | Cumulative horizontal distance for each vertex from `0`, rounded to 2 decimals |\n| `segment_slopes_percent` | number[] | Slope percentage for each segment between consecutive vertices |\n| `stats` | object | Derived elevation and slope statistics (see fields below) |\n| `srid` | integer | Always `3794` |\n| `tileset` | string | Tileset used for DEM sampling |","operationId":"drape_geometry_geometry_drape_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrapeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrapeResponse"}}}},"404":{"description":"No DEM tiles cover the geometry for the requested tileset"},"422":{"description":"One or more vertices fall on a nodata DEM cell"},"503":{"description":"Database temporarily unavailable"}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/terrain/analyze":{"get":{"tags":["Terrain"],"summary":"Terrain analysis at a point","description":"Return terrain attributes at a single XY point sampled from the DEM.\n\n**Response** — JSON object:\n\n| Field | Type | Description |\n|---|---|---|\n| `height_m` | float | Terrain elevation in metres |\n| `tpi_m` | float | Topographic Position Index: centre elevation minus neighbourhood mean |\n| `tri_m` | float | Terrain Ruggedness Index: mean absolute elevation difference from neighbourhood |\n| `slope_deg` | float | Steepness in degrees (0° = flat, 90° = cliff) |\n| `aspect_deg` | float | Steepest-descent bearing clockwise from north; `-1` if flat |\n| `aspect_cardinal` | string | N / NE / E / SE / S / SW / W / NW / flat |\n| `is_flat` | boolean | `true` when `slope_deg < flat_threshold_deg` |\n| `flat_threshold_deg` | float | Slope threshold used for flat classification |\n| `cell_size_m` | float | DEM pixel size in metres |\n| `window_size` | integer | Neighbourhood window actually used |\n| `srid` | integer | Always `3794` |\n| `tileset` | string | Tileset used |\n\n**When is `is_flat = true`?**\n\nFlat terrain is identified when slope falls below `flat_threshold_deg` (default **1.0°**).\nCommon scenarios: paved roads, car parks, flat rooftops, flood plains, lake surfaces.\nOn flat terrain `aspect_deg` is `-1` and `aspect_cardinal` is `'flat'` — the downhill\ndirection is numerically undefined.\n\n**Is `height_m` related to `window_size`?**\n\n`height_m` is bilinearly interpolated at the query point, with nearest-cell fallback\nif the interpolation neighbourhood is incomplete. It does not use analysis-window\naveraging. Changing `window_size` affects neighbourhood-derived\nmetrics (`tpi_m`, `tri_m`, `slope_deg`, `aspect_deg`) and whether a valid full window is\navailable near raster edges.\n\n**`window_size` — analysis area at 0.5 m/px**\n\n| `window_size` | Method | Ground area |\n|---|---|---|\n| **3** | Horn (1981) finite-difference | 1.5 × 1.5 m |\n| **9** (default) | Evans-Young polynomial fit | 4.5 × 4.5 m |\n| **21** | Evans-Young polynomial fit | 10.5 × 10.5 m |","operationId":"terrain_analyze_terrain_analyze_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"x","in":"query","required":true,"schema":{"type":"number","description":"X coordinate in EPSG:3794 (metres).","title":"X"},"description":"X coordinate in EPSG:3794 (metres).","example":520250.0},{"name":"y","in":"query","required":true,"schema":{"type":"number","description":"Y coordinate in EPSG:3794 (metres).","title":"Y"},"description":"Y coordinate in EPSG:3794 (metres).","example":122250.0},{"name":"tileset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"**Optional.** Tileset name (e.g. `clss_23_25`). Determines which DEM is used. Defaults to the most recently created tileset when omitted. Use `GET /tilesets` to list available names.","examples":["clss_23_25"],"title":"Tileset"},"description":"**Optional.** Tileset name (e.g. `clss_23_25`). Determines which DEM is used. Defaults to the most recently created tileset when omitted. Use `GET /tilesets` to list available names."},{"name":"window_size","in":"query","required":false,"schema":{"type":"integer","maximum":99,"minimum":3,"description":"**Optional.** Side length of the square pixel neighbourhood used to compute slope and aspect. Must be an **odd** integer between 3 and 99 (even values are rejected). **9** (default) → Evans-Young polynomial fit over 81 cells — smoother, filters micro-relief. **3** → Horn (1981) 3×3 finite-difference kernel — captures fine local detail. **15** → Evans-Young polynomial fit over 225 cells — stronger smoothing. Larger values are suited to gentle terrain; smaller values to rugged terrain.","examples":[3,9,15],"default":9,"title":"Window Size"},"description":"**Optional.** Side length of the square pixel neighbourhood used to compute slope and aspect. Must be an **odd** integer between 3 and 99 (even values are rejected). **9** (default) → Evans-Young polynomial fit over 81 cells — smoother, filters micro-relief. **3** → Horn (1981) 3×3 finite-difference kernel — captures fine local detail. **15** → Evans-Young polynomial fit over 225 cells — stronger smoothing. Larger values are suited to gentle terrain; smaller values to rugged terrain."},{"name":"flat_threshold_deg","in":"query","required":false,"schema":{"type":"number","maximum":45.0,"minimum":0.0,"description":"**Optional.** Slope threshold in degrees below which the terrain is classified as flat. Default is **1.0°**. When `is_flat` is `true`, aspect is undefined: `aspect_deg` is set to `-1` and `aspect_cardinal` to `'flat'`. Increase this value to classify gently sloping surfaces as flat; decrease it (towards 0) for stricter flat detection.","examples":[1.0,2.0,0.5],"default":1.0,"title":"Flat Threshold Deg"},"description":"**Optional.** Slope threshold in degrees below which the terrain is classified as flat. Default is **1.0°**. When `is_flat` is `true`, aspect is undefined: `aspect_deg` is set to `-1` and `aspect_cardinal` to `'flat'`. Increase this value to classify gently sloping surfaces as flat; decrease it (towards 0) for stricter flat detection."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerrainResponse"}}}},"404":{"description":"No DEM tiles cover the point for the requested tileset"},"422":{"description":"Invalid coordinates, odd-window violation, or nodata in neighbourhood"},"503":{"description":"Database temporarily unavailable"}}}},"/terrain/height":{"get":{"tags":["Terrain"],"summary":"Terrain height at a point (fast path)","description":"Return only `height_m` for a single XY point.\n\nThis endpoint is optimized for speed: it samples one elevation value and skips neighbourhood-based computations (TPI, slope, aspect, flat classification).","operationId":"terrain_height_terrain_height_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"x","in":"query","required":true,"schema":{"type":"number","description":"X coordinate in EPSG:3794 (metres).","title":"X"},"description":"X coordinate in EPSG:3794 (metres).","example":520250.0},{"name":"y","in":"query","required":true,"schema":{"type":"number","description":"Y coordinate in EPSG:3794 (metres).","title":"Y"},"description":"Y coordinate in EPSG:3794 (metres).","example":122250.0},{"name":"tileset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"**Optional.** Tileset name (e.g. `clss_23_25`). Defaults to the most recently created tileset when omitted.","examples":["clss_23_25"],"title":"Tileset"},"description":"**Optional.** Tileset name (e.g. `clss_23_25`). Defaults to the most recently created tileset when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeightResponse"}}}},"404":{"description":"No DEM tiles cover the point for the requested tileset"},"422":{"description":"Invalid coordinates or nodata at the query point"},"503":{"description":"Database temporarily unavailable"}}}},"/terrain/contours":{"post":{"tags":["Terrain"],"summary":"Generate terrain contour lines","description":"Generate contour lines from DEM and return them as DXF.","operationId":"terrain_contours_terrain_contours_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerrainContoursRequest"}}},"required":true},"responses":{"200":{"description":"DXF file containing contour lines","content":{"application/json":{"schema":{}},"application/dxf":{}}},"404":{"description":"No DEM tiles found for the requested geometry/tileset"},"413":{"description":"Request exceeds configured limits: input polygon area is too large or generated output exceeds the configured size limit"},"422":{"description":"Invalid geometry or contour generation failed"},"503":{"description":"Database temporarily unavailable"}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/geoid/correction":{"get":{"tags":["Geoid"],"summary":"Geoid height correction at a point","description":"Return geoid correction for a single XY point.\n\nGeoid data:\n# Slovenia (SLO-VRP2016/Koper)\n\nInterpolation method: bilinear (100 m grid).","operationId":"geoid_correction_geoid_correction_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"x","in":"query","required":true,"schema":{"type":"number","title":"easting (X)","description":"X coordinate (E) in EPSG:3794 (metres)."},"description":"X coordinate (E) in EPSG:3794 (metres).","example":520250.0},{"name":"y","in":"query","required":true,"schema":{"type":"number","title":"northing (Y)","description":"Y coordinate (N) in EPSG:3794 (metres)."},"description":"Y coordinate (N) in EPSG:3794 (metres).","example":122250.0}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoidCorrectionResponse"}}}},"422":{"description":"Point outside geoid coverage, nodata, or invalid coordinate values"},"500":{"description":"Geoid dataset not configured or unreadable"}}}},"/geocode/forward":{"get":{"tags":["Geocoding"],"summary":"Forward geocode an address query","operationId":"forward_geocode_geocode_forward_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Address search query.","examples":["Trzinska cesta 20a"],"title":"Q"},"description":"Address search query."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Maximum number of ranked matches to return.","examples":[5],"default":5,"title":"Limit"},"description":"Maximum number of ranked matches to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardGeocodeResponse"}}}},"422":{"description":"Invalid query or limit value"},"503":{"description":"Database temporarily unavailable"},"500":{"description":"Unexpected geocoding failure"}}}},"/geocode/reverse":{"get":{"tags":["Geocoding"],"summary":"Reverse geocode nearest addresses for a point","operationId":"reverse_geocode_point_geocode_reverse_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"x","in":"query","required":true,"schema":{"type":"number","description":"Input X coordinate in EPSG:3794.","examples":[520250.0],"title":"X"},"description":"Input X coordinate in EPSG:3794."},{"name":"y","in":"query","required":true,"schema":{"type":"number","description":"Input Y coordinate in EPSG:3794.","examples":[122250.0],"title":"Y"},"description":"Input Y coordinate in EPSG:3794."},{"name":"max_distance","in":"query","required":false,"schema":{"type":"number","exclusiveMinimum":0,"description":"Maximum reverse-geocode search radius in meters.","examples":[100.0],"default":100.0,"title":"Max Distance"},"description":"Maximum reverse-geocode search radius in meters."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Maximum number of nearest addresses to return.","examples":[1],"default":1,"title":"Limit"},"description":"Maximum number of nearest addresses to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseGeocodeResponse"}}}},"422":{"description":"Invalid coordinates, limit, or max_distance"},"503":{"description":"Database temporarily unavailable"},"500":{"description":"Unexpected geocoding failure"}}}},"/buildings/info":{"get":{"tags":["Buildings"],"summary":"Get building information by id","operationId":"get_building_buildings_info_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"building_id","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Building identifier from public.buildings.id.","examples":[31985416],"title":"Building Id"},"description":"Building identifier from public.buildings.id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingInfoResponse"}}}},"404":{"description":"Building not found"},"422":{"description":"Invalid building_id value"},"503":{"description":"Database temporarily unavailable"},"500":{"description":"Unexpected buildings lookup failure"}}}},"/buildings/nearest":{"get":{"tags":["Buildings"],"summary":"Get the nearest building with an address and its nearest linked address","operationId":"get_nearest_building_endpoint_buildings_nearest_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"x","in":"query","required":true,"schema":{"type":"number","description":"Input X coordinate in EPSG:3794.","examples":[520250.0],"title":"X"},"description":"Input X coordinate in EPSG:3794."},{"name":"y","in":"query","required":true,"schema":{"type":"number","description":"Input Y coordinate in EPSG:3794.","examples":[122250.0],"title":"Y"},"description":"Input Y coordinate in EPSG:3794."},{"name":"max_distance","in":"query","required":true,"schema":{"type":"number","exclusiveMinimum":0,"description":"Maximum building search distance in meters.","examples":[100.0],"title":"Max Distance"},"description":"Maximum building search distance in meters."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NearestBuildingResponse"}}}},"422":{"description":"Invalid coordinates or max_distance"},"503":{"description":"Database temporarily unavailable"},"500":{"description":"Unexpected buildings lookup failure"}}}},"/buildings/map":{"get":{"tags":["Buildings"],"summary":"Get map image for a building footprint area","operationId":"get_building_map_buildings_map_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"building_id","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Building identifier from public.buildings.id.","examples":[31985416],"title":"Building Id"},"description":"Building identifier from public.buildings.id."},{"name":"layers","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated WMS layers. Allowed by BUILDING_MAP_ALLOWED_LAYERS_CSV.","examples":["Orthophoto,Buildings"],"title":"Layers"},"description":"Comma-separated WMS layers. Allowed by BUILDING_MAP_ALLOWED_LAYERS_CSV."},{"name":"width","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Output image width in pixels.","examples":[1024],"default":1024,"title":"Width"},"description":"Output image width in pixels."},{"name":"height","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Output image height in pixels.","examples":[1024],"default":1024,"title":"Height"},"description":"Output image height in pixels."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Building not found or has no geometry"},"422":{"description":"Invalid request parameters"},"503":{"description":"WMS service unavailable"},"500":{"description":"Unexpected map request failure"}}}},"/buildings/model":{"get":{"tags":["Buildings"],"summary":"Generate CityJSON building model from point cloud and building footprint","operationId":"get_building_model_buildings_model_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"building_id","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Building identifier from public.buildings.id.","examples":[31985416],"title":"Building Id"},"description":"Building identifier from public.buildings.id."},{"name":"tileset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional tileset name. Defaults to the newest tileset when omitted.","examples":["clss_23_25"],"title":"Tileset"},"description":"Optional tileset name. Defaults to the newest tileset when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Building not found or no points available"},"422":{"description":"Invalid request parameters"},"503":{"description":"Missing required libraries"},"500":{"description":"Unexpected model generation failure"}}}},"/organizations/{organization_id}":{"get":{"tags":["Organizations"],"summary":"Get organization by id","operationId":"get_organization_by_id_organizations__organization_id__get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Organization identifier.","title":"Organization Id"},"description":"Organization identifier."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"404":{"description":"Organization not found"},"422":{"description":"Invalid organization_id value"},"503":{"description":"Database temporarily unavailable"},"500":{"description":"Unexpected organization lookup failure"}}}},"/export/layers":{"get":{"tags":["Export"],"summary":"List downloadable vector layers","operationId":"export_layers_export_layers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportLayersResponse"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/export/vector":{"post":{"tags":["Export"],"summary":"Export vector layers clipped/filtered to an AOI","operationId":"export_vector_export_vector_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportVectorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/geo+json":{},"application/zip":{},"application/dxf":{}}},"413":{"description":"Input polygon area or generated output exceeds configured limits"},"422":{"description":"Invalid geometry or unknown/disabled layer name"}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/export/orthophoto":{"post":{"tags":["Export"],"summary":"Export orthophoto raster (GeoTIFF or TIFF)","description":"Set `format` to `\"geotiff\"` (default) to download a GeoTIFF, or `\"tiff\"` to download a ZIP containing a plain TIFF and its TFW world file.","operationId":"export_orthophoto_export_orthophoto_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrthophotoExportRequest"},"examples":{"geotiff":{"summary":"GeoTIFF (default)","value":{"bbox":[499000,109000,501000,111000],"format":"geotiff"}},"tiff":{"summary":"Plain TIFF with world file (ZIP)","value":{"bbox":[499000,109000,501000,111000],"format":"tiff"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"image/tiff":{},"application/zip":{}}},"404":{"description":"No orthophoto tiles intersect the requested area"},"413":{"description":"Requested orthophoto output exceeds configured limits"},"422":{"description":"Invalid request, missing source files, partial coverage, or GDAL export failure"}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/changelog":{"get":{"tags":["Docs"],"summary":"Project changelog","description":"Return the repository changelog as plain text.","operationId":"changelog_changelog_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}}},"components":{"schemas":{"BuildingInfoResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"id":{"type":"integer","title":"Id","description":"Building row identifier."},"cadastral_municipality_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cadastral Municipality Id","description":"Cadastral municipality identifier."},"building_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Number","description":"Building number within cadastral municipality."},"number_of_parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Parts","description":"Number of building parts."},"number_of_floors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Floors","description":"Number of floors."},"building_use":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Use","description":"Building usage category."},"has_address":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Address","description":"Whether building has a registered address."},"electricity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Electricity","description":"Whether building has electricity connection."},"gas":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gas","description":"Whether building has gas connection."},"water_supply":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Water Supply","description":"Whether building has water supply connection."},"sewer_connection":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sewer Connection","description":"Whether building has sewer connection."},"construction_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Construction Year","description":"Building construction year."},"facade_renovation_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Facade Renovation Year","description":"Facade renovation year."},"roof_renovation_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Roof Renovation Year","description":"Roof renovation year."},"building_height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Building Height","description":"Building height in meters."},"registration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Type","description":"Building registration type."},"number_of_residential_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Residential Units","description":"Number of residential units."},"number_of_business_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Business Units","description":"Number of business units."},"net_floor_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Floor Area","description":"Net floor area in square meters."},"gross_floor_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Floor Area","description":"Gross floor area in square meters."},"municipality_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Municipality Id","description":"Municipality identifier."},"roofprint_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roofprint Area","description":"2D footprint area from geom in square meters (EPSG:3794)."}},"type":"object","required":["id","cadastral_municipality_id","building_number","number_of_parts","number_of_floors","building_use","has_address","electricity","gas","water_supply","sewer_connection","construction_year","facade_renovation_year","roof_renovation_year","building_height","registration_type","number_of_residential_units","number_of_business_units","net_floor_area","gross_floor_area","municipality_id","roofprint_area"],"title":"BuildingInfoResponse"},"ClipRequest":{"properties":{"geometry":{"type":"string","title":"Geometry","description":"**Required.** Clip boundary as WKT in EPSG:3794. Typically a POLYGON or MULTIPOLYGON.","examples":["POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))"]},"tileset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tileset","description":"**Optional.** Tileset name (e.g. `clss_23_25`). Defaults to the most recently created tileset when omitted. Use `GET /tilesets` to list available names.","examples":["clss_23_25"]},"categories":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Categories","description":"**Optional.** LAS classification codes to keep. Accepts an array of integers. When omitted, all classifications are included. Common codes: 1=unclassified, 2=ground, 3=low veg, 4=medium veg, 5=high veg, 6=building, 7=noise, 9=water, 17=bridge.","examples":[[6],[3,4,5]]}},"type":"object","required":["geometry"],"title":"ClipRequest"},"DemClipRequest":{"properties":{"geometry":{"type":"string","title":"Geometry","description":"**Required.** Clip boundary as WKT in EPSG:3794. Typically a POLYGON or MULTIPOLYGON.","examples":["POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))"]},"tileset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tileset","description":"**Optional.** Tileset name (e.g. `clss_23_25`). Defaults to the most recently created tileset when omitted. Use `GET /tilesets` to list available names.","examples":["clss_23_25"]},"output_format":{"type":"string","enum":["geotiff","txt","las","laz"],"title":"Output Format","description":"Output format. `geotiff` returns raster clip (default), `txt` returns point rows in `X;Y;Z` format with no header, `laz` returns a compressed LAZ point cloud, and `las` returns an uncompressed LAS point cloud. Both contain one point per DEM cell and use LAS 1.2, point format 0.","default":"geotiff","examples":["geotiff","txt","laz","las"]},"resolution_m":{"anyOf":[{"type":"number","maximum":10.0,"minimum":0.5},{"type":"null"}],"title":"Resolution M","description":"Optional output resolution in meters. Use larger values (e.g. 2.0) to downscale from native DEM resolution before exporting.","default":0.5,"examples":[0.5,2.0,5.0]}},"type":"object","required":["geometry"],"title":"DemClipRequest"},"DrapeRequest":{"properties":{"geometry":{"type":"string","title":"Geometry","description":"**Required.** Input geometry as WKT in EPSG:3794. Any geometry type is accepted: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon. Z values in the input are ignored and replaced by sampled DEM elevations. Line elevations are smoothed using a 5 m local quadratic window where at least five distinct vertex positions are available.","examples":["LINESTRING(519200 121200, 520300 122300, 520800 123200)","POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))"]},"offset":{"type":"number","title":"Offset","description":"**Optional.** Constant Z offset in metres added to every sampled elevation. Positive values raise the geometry above the terrain surface; negative values push it below. Default is `0.0`. Line elevations may differ from the sampled terrain because of smoothing.","default":0.0,"examples":[0.0,0.5,-0.1]},"segmentize_percent":{"anyOf":[{"type":"number","maximum":50.0,"minimum":0.0},{"type":"null"}],"title":"Segmentize Percent","description":"**Optional.** Densify line/polygon geometry before draping by adding new vertices at roughly this percentage of total geometry length. Example: `10` inserts vertices about every 10% of length. Allowed range is `0` to `50`; `0` disables densification and behaves like omitting the parameter. Useful for long segments so added vertices also receive sampled Z values. Default is omitted (`null`) which keeps the current behavior.","examples":[5.0,10.0]},"tileset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tileset","description":"**Optional.** Tileset name (e.g. `clss_23_25`). Determines which DEM is used for elevation sampling. Defaults to the most recently created tileset when omitted. Use `GET /tilesets` to list available names.","examples":["clss_23_25"]}},"type":"object","required":["geometry"],"title":"DrapeRequest"},"DrapeResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"geometry":{"type":"string","title":"Geometry","description":"Output WKT Z geometry with coordinates rounded to 3 decimal places."},"offset":{"type":"number","title":"Offset","description":"Input Z offset in metres that was applied to elevations."},"segmentize_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Segmentize Percent","description":"Input densification percentage used before draping (`null` when omitted)."},"segmented_vertices_added":{"type":"integer","title":"Segmented Vertices Added","description":"Number of vertices added by optional segmentization before draping."},"srid":{"type":"integer","title":"Srid","description":"Coordinate reference system EPSG code (always 3794 — no reprojection is performed)."},"tileset":{"type":"string","title":"Tileset","description":"Tileset from which the DEM elevations were sampled."},"acquired_date":{"type":"string","title":"Acquired Date","description":"Comma-separated distinct acquisition dates from DB tiles used for draping."},"distances":{"items":{"type":"number"},"type":"array","title":"Distances","description":"Cumulative horizontal distance at each vertex from start, in metres, rounded to 2 decimals."},"segment_slopes_percent":{"items":{"type":"number"},"type":"array","title":"Segment Slopes Percent","description":"Per-segment slope in percent. Segment i is between vertex i and i+1. Array length is one less than vertices."},"stats":{"$ref":"#/components/schemas/DrapeStats","description":"Derived elevation and slope statistics for the draped geometry."}},"type":"object","required":["geometry","offset","segmentize_percent","segmented_vertices_added","srid","tileset","acquired_date","distances","segment_slopes_percent","stats"],"title":"DrapeResponse"},"DrapeStats":{"properties":{"z_min_m":{"type":"number","title":"Z Min M","description":"Minimum draped elevation (metres)."},"z_max_m":{"type":"number","title":"Z Max M","description":"Maximum draped elevation (metres)."},"z_range_m":{"type":"number","title":"Z Range M","description":"Elevation range (`z_max_m - z_min_m`) in metres."},"length_m":{"type":"number","title":"Length M","description":"Total horizontal 2D length across connected segments (metres)."},"length3d_m":{"type":"number","title":"Length3D M","description":"Total 3D length across connected segments using draped Z values (metres)."},"elevation_gain_m":{"type":"number","title":"Elevation Gain M","description":"Sum of all positive elevation deltas across connected segments (metres)."},"elevation_loss_m":{"type":"number","title":"Elevation Loss M","description":"Sum of absolute negative elevation deltas across connected segments (metres)."},"avg_abs_slope_percent":{"type":"number","title":"Avg Abs Slope Percent","description":"Average absolute segment slope in percent."},"max_up_slope_percent":{"type":"number","title":"Max Up Slope Percent","description":"Maximum uphill segment slope in percent."},"max_down_slope_percent":{"type":"number","title":"Max Down Slope Percent","description":"Maximum downhill segment slope in percent (reported as a positive magnitude)."}},"type":"object","required":["z_min_m","z_max_m","z_range_m","length_m","length3d_m","elevation_gain_m","elevation_loss_m","avg_abs_slope_percent","max_up_slope_percent","max_down_slope_percent"],"title":"DrapeStats"},"ExportLayerInfo":{"properties":{"table_name":{"type":"string","title":"Table Name","description":"Registered layer identifier (api_data table name)."},"friendly_name":{"type":"string","title":"Friendly Name","description":"Human-readable layer name, also used as the DXF CAD layer name."},"geometry_type":{"type":"string","title":"Geometry Type","description":"Declared geometry type: point, linestring, or polygon."},"label_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Column","description":"Column used as the DXF text label for polygon features."},"source_status_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Source Status Date","description":"Status date of the underlying data as published by the original source (e.g. cadastre snapshot date)."}},"type":"object","required":["table_name","friendly_name","geometry_type","label_column"],"title":"ExportLayerInfo"},"ExportLayersResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"layers":{"items":{"$ref":"#/components/schemas/ExportLayerInfo"},"type":"array","title":"Layers"}},"type":"object","required":["layers"],"title":"ExportLayersResponse"},"ExportVectorRequest":{"properties":{"geometry":{"type":"string","title":"Geometry","description":"**Required.** AOI boundary as WKT in EPSG:3794. Typically a POLYGON or MULTIPOLYGON.","examples":["POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))"]},"layers":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Layers","description":"Registered layer names to export. See GET /export/layers for available names.","examples":[["buildings"]]},"output_format":{"type":"string","enum":["geojson","dxf"],"title":"Output Format","description":"Output format. `geojson` returns one GeoJSON file for a single requested layer, or a ZIP containing one GeoJSON file per layer when multiple layers are requested. Each GeoJSON file declares its registered source CRS. `dxf` returns one file with one CAD layer per source layer.","default":"geojson"},"clip":{"type":"boolean","title":"Clip","description":"`true` clips geometries to the AOI boundary (ST_Intersection). `false` returns full geometries of features that merely intersect the AOI. Has no effect on point layers, which are always filtered, never clipped.","default":true}},"type":"object","required":["geometry","layers"],"title":"ExportVectorRequest"},"ForwardGeocodeResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"query":{"type":"string","title":"Query","description":"Original query string."},"limit":{"type":"integer","title":"Limit","description":"Effective maximum number of returned matches."},"count":{"type":"integer","title":"Count","description":"Number of returned matches."},"results":{"items":{"$ref":"#/components/schemas/GeocodeResult"},"type":"array","title":"Results","description":"Ordered geocoding matches."}},"type":"object","required":["query","limit","count","results"],"title":"ForwardGeocodeResponse"},"GeocodeResult":{"properties":{"id":{"type":"integer","title":"Id","description":"Address row identifier."},"building_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id","description":"Building identifier from address register."},"full_address":{"type":"string","title":"Full Address","description":"Formatted address label."},"street_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Name","description":"Street name component."},"house_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Number","description":"House number component."},"settlement_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Name","description":"Settlement name component."},"postal_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postal Code","description":"Postal code component."},"postal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Name","description":"Postal place name component."},"x":{"type":"number","title":"X","description":"Point X coordinate in EPSG:3794."},"y":{"type":"number","title":"Y","description":"Point Y coordinate in EPSG:3794."},"score":{"type":"number","title":"Score","description":"Ranking score used to order matches."}},"type":"object","required":["id","building_id","full_address","street_name","house_number","settlement_name","postal_code","postal_name","x","y","score"],"title":"GeocodeResult"},"GeoidCorrectionResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"x":{"type":"number","title":"X","description":"Input X coordinate (EPSG:3794, metres)."},"y":{"type":"number","title":"Y","description":"Input Y coordinate (EPSG:3794, metres)."},"correction_m":{"type":"number","title":"Correction M","description":"Geoid height correction in meters, rounded to two decimals."},"geoid_model":{"type":"string","title":"Geoid Model","description":"Geoid model name.","default":"Slovenia (SLO-VRP2016/Koper)"},"grid_size_m":{"type":"integer","title":"Grid Size M","description":"Geoid raster grid resolution in meters.","default":100}},"type":"object","required":["x","y","correction_m"],"title":"GeoidCorrectionResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service provider copyright and terms attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services"},"status":{"type":"string","title":"Status","description":"Health status."}},"type":"object","required":["status"],"title":"HealthResponse"},"HeightResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"height_m":{"type":"number","title":"Height M","description":"Terrain elevation at the point in metres (EPSG:3794 vertical datum)."},"cell_size_m":{"type":"number","title":"Cell Size M","description":"DEM cell size in metres at the sampled location."},"srid":{"type":"integer","title":"Srid","description":"Coordinate reference system EPSG code."},"tileset":{"type":"string","title":"Tileset","description":"Tileset from which the DEM was sourced."},"tilename":{"type":"string","title":"Tilename","description":"Comma-separated tile names used to sample terrain height. Border-adjacent points may involve more than one DEM tile."},"acquired_date":{"type":"string","title":"Acquired Date","description":"Comma-separated distinct acquisition dates from the tile or tiles used to sample terrain height."}},"type":"object","required":["height_m","cell_size_m","srid","tileset","tilename","acquired_date"],"title":"HeightResponse"},"NearestBuildingFields":{"properties":{"id":{"type":"integer","title":"Id","description":"Building row identifier."},"cadastral_municipality_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cadastral Municipality Id","description":"Cadastral municipality identifier."},"building_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Number","description":"Building number within cadastral municipality."},"number_of_parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Parts","description":"Number of building parts."},"number_of_floors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Floors","description":"Number of floors."},"building_use":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Building Use","description":"Building usage category."},"has_address":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Address","description":"Whether building has a registered address."},"electricity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Electricity","description":"Whether building has electricity connection."},"gas":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gas","description":"Whether building has gas connection."},"water_supply":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Water Supply","description":"Whether building has water supply connection."},"sewer_connection":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sewer Connection","description":"Whether building has sewer connection."},"construction_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Construction Year","description":"Building construction year."},"facade_renovation_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Facade Renovation Year","description":"Facade renovation year."},"roof_renovation_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Roof Renovation Year","description":"Roof renovation year."},"building_height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Building Height","description":"Building height in meters."},"registration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Type","description":"Building registration type."},"number_of_residential_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Residential Units","description":"Number of residential units."},"number_of_business_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Business Units","description":"Number of business units."},"net_floor_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Floor Area","description":"Net floor area in square meters."},"gross_floor_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Floor Area","description":"Gross floor area in square meters."},"municipality_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Municipality Id","description":"Municipality identifier."},"roofprint_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roofprint Area","description":"2D footprint area from geom in square meters (EPSG:3794)."},"address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Address Id","description":"Nearest address identifier linked to this building."}},"type":"object","required":["id","cadastral_municipality_id","building_number","number_of_parts","number_of_floors","building_use","has_address","electricity","gas","water_supply","sewer_connection","construction_year","facade_renovation_year","roof_renovation_year","building_height","registration_type","number_of_residential_units","number_of_business_units","net_floor_area","gross_floor_area","municipality_id","roofprint_area","address_id"],"title":"NearestBuildingFields"},"NearestBuildingResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"building":{"anyOf":[{"$ref":"#/components/schemas/NearestBuildingFields"},{"type":"null"}],"description":"Nearest building, or null when none is within range."}},"type":"object","required":["building"],"title":"NearestBuildingResponse"},"OrganizationResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"id":{"type":"integer","title":"Id","description":"Organization identifier."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Organization name."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Organization type."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Contact email."},"address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Address Id","description":"Address identifier from addresses table."},"full_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Address","description":"Formatted full address resolved from address_id."},"street_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Name","description":"Street name component."},"house_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Number","description":"House number component."},"settlement_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Name","description":"Settlement name component."},"postal_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postal Code","description":"Postal code component."},"postal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Name","description":"Postal place name component."}},"type":"object","required":["id","name","type","email","address_id","full_address","street_name","house_number","settlement_name","postal_code","postal_name"],"title":"OrganizationResponse"},"OrthophotoExportRequest":{"properties":{"bbox":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Bbox","description":"Optional export bounds as [minx, miny, maxx, maxy] or 'minx,miny,maxx,maxy' in EPSG:3794.","examples":[[499000,109000,501000,111000]]},"geometry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geometry","description":"Optional AOI polygon WKT in EPSG:3794. Required when clip=true.","examples":["POLYGON((499000 109000, 501000 109000, 501000 111000, 499000 111000, 499000 109000))"]},"resolution":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Resolution","description":"Output resolution in metres. Defaults to 0.25 m. Orthophoto exports never upscale source imagery.","examples":[0.25]},"year":{"anyOf":[{"type":"integer"},{"type":"string","const":"latest"}],"title":"Year","description":"Orthophoto year, or 'latest' to select the newest available source per orthophoto tile.","default":"latest","examples":["latest",2025]},"clip":{"type":"boolean","title":"Clip","description":"When true, apply a real polygon mask. When false, export the bbox or geometry bounds.","default":false},"format":{"type":"string","enum":["geotiff","tiff"],"title":"Format","description":"Output format: geotiff (GeoTIFF, default) or tiff (plain TIFF with a TFW world file in a ZIP archive).","default":"geotiff"}},"type":"object","title":"OrthophotoExportRequest"},"ReverseGeocodeResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"x":{"type":"number","title":"X","description":"Input point X coordinate in EPSG:3794."},"y":{"type":"number","title":"Y","description":"Input point Y coordinate in EPSG:3794."},"max_distance":{"type":"number","title":"Max Distance","description":"Maximum search radius in meters."},"limit":{"type":"integer","title":"Limit","description":"Effective maximum number of returned matches."},"count":{"type":"integer","title":"Count","description":"Number of returned matches."},"match":{"type":"string","enum":["address","area"],"title":"Match","description":"Match type: 'address' when address results found, 'area' when falling back to settlement/municipality."},"results":{"items":{"$ref":"#/components/schemas/ReverseGeocodeResult"},"type":"array","title":"Results","description":"Matched results. Address fields populated for address matches; settlement/municipality fields populated for area matches."}},"type":"object","required":["x","y","max_distance","limit","count","match","results"],"title":"ReverseGeocodeResponse"},"ReverseGeocodeResult":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"Address row identifier. Null for area matches."},"building_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Building Id","description":"Building identifier from address register."},"full_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Address","description":"Formatted address label. Null for area matches."},"street_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Name","description":"Street name component."},"house_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"House Number","description":"House number component."},"settlement_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Name","description":"Settlement name component."},"municipality_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Municipality Name","description":"Municipality name. Populated for area matches."},"postal_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postal Code","description":"Postal code component."},"postal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Name","description":"Postal place name component."},"x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X","description":"Address point X coordinate in EPSG:3794. Null for area matches."},"y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y","description":"Address point Y coordinate in EPSG:3794. Null for area matches."},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance","description":"Distance from query point to address point in meters. Null for area matches."}},"type":"object","title":"ReverseGeocodeResult"},"TerrainContoursRequest":{"properties":{"geometry":{"type":"string","title":"Geometry","description":"**Required.** Clip boundary as WKT in EPSG:3794. Typically a POLYGON or MULTIPOLYGON.","examples":["POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))"]},"tileset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tileset","description":"**Optional.** Tileset name (e.g. `clss_23_25`). Defaults to the most recently created tileset when omitted.","examples":["clss_23_25"]},"contour_interval_m":{"type":"number","maximum":100.0,"minimum":0.1,"title":"Contour Interval M","description":"Contour interval in metres.","default":1.0,"examples":[1.0,2.0,5.0]},"master_contour_interval_m":{"type":"number","exclusiveMinimum":0.0,"title":"Master Contour Interval M","description":"Master contour interval in metres. Master contours (e.g. every 5m) appear in their own layer with elevation labels. Must be greater than contour_interval_m.","default":5.0,"examples":[5.0,10.0]},"simplify_tolerance_m":{"type":"number","maximum":5.0,"minimum":0.0,"title":"Simplify Tolerance M","description":"Optional post-clip line simplification tolerance in metres.","default":0.5,"examples":[0.5,0.2]}},"type":"object","required":["geometry"],"title":"TerrainContoursRequest"},"TerrainResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"height_m":{"type":"number","title":"Height M","description":"Bilinearly interpolated DEM elevation at the point in metres (EPSG:3794 vertical datum), with nearest-cell fallback when the bilinear neighbourhood is incomplete."},"tpi_m":{"type":"number","title":"Tpi M","description":"Topographic Position Index in metres (centre elevation minus mean of surrounding window cells). Positive values indicate local highs, negative values local lows."},"tri_m":{"type":"number","title":"Tri M","description":"Terrain Ruggedness Index in metres (mean absolute elevation difference between the centre cell and surrounding window cells). Higher values indicate rougher terrain."},"slope_deg":{"type":"number","title":"Slope Deg","description":"Steepness of terrain in degrees computed from the DEM neighbourhood window (0° = flat, 90° = vertical cliff)."},"aspect_deg":{"type":"number","title":"Aspect Deg","description":"Direction of the steepest downhill slope in degrees clockwise from north (0° / 360° = North, 90° = East, 180° = South, 270° = West). -1 when is_flat is True (aspect undefined on flat terrain)."},"aspect_cardinal":{"type":"string","title":"Aspect Cardinal","description":"8-point compass label for the aspect direction: N, NE, E, SE, S, SW, W, NW, or 'flat'."},"is_flat":{"type":"boolean","title":"Is Flat","description":"True when slope_deg < flat_threshold_deg. On flat terrain the slope direction is unreliable, so aspect_deg is -1 and aspect_cardinal is 'flat'. Typical causes: paved roads, flat rooftops, flood plains, parking areas."},"flat_threshold_deg":{"type":"number","title":"Flat Threshold Deg","description":"Slope threshold used for flat classification (degrees)."},"cell_size_m":{"type":"number","title":"Cell Size M","description":"DEM cell size (metres) used for gradient computation."},"window_size":{"type":"integer","title":"Window Size","description":"Side length of the pixel neighbourhood actually used. 3 = Horn kernel; >3 = Evans-Young polynomial fit."},"srid":{"type":"integer","title":"Srid","description":"Coordinate reference system EPSG code."},"tileset":{"type":"string","title":"Tileset","description":"Tileset from which the DEM was sourced."},"tilename":{"type":"string","title":"Tilename","description":"Comma-separated list of tile names used in the terrain analysis operation."},"acquired_date":{"type":"string","title":"Acquired Date","description":"Comma-separated distinct acquisition dates from the tiles used in terrain analysis."}},"type":"object","required":["height_m","tpi_m","tri_m","slope_deg","aspect_deg","aspect_cardinal","is_flat","flat_threshold_deg","cell_size_m","window_size","srid","tileset","tilename","acquired_date"],"title":"TerrainResponse"},"TileFeature":{"properties":{"type":{"type":"string","title":"Type","description":"GeoJSON object type.","default":"Feature"},"geometry":{"title":"Geometry","description":"Tile polygon geometry in EPSG:3794."},"properties":{"$ref":"#/components/schemas/TileProperties"}},"type":"object","required":["geometry","properties"],"title":"TileFeature"},"TileFeatureCollection":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"type":{"type":"string","title":"Type","description":"GeoJSON object type.","default":"FeatureCollection"},"features":{"items":{"$ref":"#/components/schemas/TileFeature"},"type":"array","title":"Features","description":"Array of tile polygon features."}},"type":"object","required":["features"],"title":"TileFeatureCollection"},"TileProperties":{"properties":{"name":{"type":"string","title":"Name","description":"Tile identifier matching the tileindex grid cell name."},"tileset":{"type":"string","title":"Tileset","description":"Tileset this tile belongs to."},"acquired_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acquired Date","description":"Acquisition date/period label of this tile, if recorded."}},"type":"object","required":["name","tileset","acquired_date"],"title":"TileProperties"},"TileSearchRequest":{"properties":{"geometry":{"type":"string","title":"Geometry","description":"**Required.** Clip/search boundary as WKT in EPSG:3794. Typically a POLYGON or MULTIPOLYGON. Only tiles whose tileindex polygon intersects this geometry are returned.","examples":["POLYGON((519200 121200, 520200 121200, 520200 122200, 519200 122200, 519200 121200))"]},"tileset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tileset","description":"**Optional.** Tileset name to search within (e.g. `clss_23_25`). When omitted the most recently created tileset is used automatically. Use `GET /tilesets` to see available names.","examples":["clss_23_25"]}},"type":"object","required":["geometry"],"title":"TileSearchRequest"},"TilesetItem":{"properties":{"name":{"type":"string","title":"Name","description":"Unique tileset identifier (matches the folder name under data_prepared/)."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description, e.g. acquisition date range."},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO-8601 timestamp when this tileset was registered."},"tile_count":{"type":"integer","title":"Tile Count","description":"Number of tiles currently imported for this tileset."}},"type":"object","required":["name","description","created_at","tile_count"],"title":"TilesetItem"},"TilesetsResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service and dataset provider attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services. Source Data provider: Surveying and Mapping Authority of the Republic of Slovenia"},"items":{"items":{"$ref":"#/components/schemas/TilesetItem"},"type":"array","title":"Items","description":"Tileset objects ordered by creation date (newest first)."}},"type":"object","required":["items"],"title":"TilesetsResponse"},"TokenRequest":{"properties":{"username":{"type":"string","title":"Username","description":"Username for interactive user login."},"password":{"type":"string","title":"Password","description":"Password for interactive user login."}},"type":"object","required":["username","password"],"title":"TokenRequest"},"TokenResponse":{"properties":{"attribution":{"type":"string","title":"Attribution","description":"Service provider copyright and terms attribution.","default":"Copyright 2026 Level2, https://level2.si. Terms of use: https://level2.si/terms-of-use-web-services"},"access_token":{"type":"string","title":"Access Token","description":"JWT access token."},"token_type":{"type":"string","title":"Token Type","description":"Token type used in Authorization header.","default":"bearer"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","description":"Token validity period in seconds."},"role":{"type":"string","title":"Role","description":"Role granted to this principal."}},"type":"object","required":["access_token","expires_in_seconds","role"],"title":"TokenResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"}}}}