# BuildableEnvelopeValue

not specified in the source contract

Layer keys: `buildable_envelope`.

## Cost and inputs

`x-request-cost`: 1 request per call via [GET /v1/layer/{layer}](../operations/layer.md).

Dokładnie jeden z parametrów q, id, point (lat i lng razem liczą się jako point). Wszystkie punkty odczytu API i wszystkie narzędzia obsługują te trzy warianty.

## Value schema

| Field | Required | Schema / constraints | Description |
| --- | --- | --- | --- |
| `buildable_area_m2` | yes | `{"minimum": 0, "type": "number", "x-unit": "m2"}` | not specified in the source contract |
| `buildable_depth_m` | yes | `{"minimum": 0, "type": ["number", "null"], "x-unit": "m"}` | not specified in the source contract |
| `buildable_width_m` | yes | `{"minimum": 0, "type": ["number", "null"], "x-unit": "m"}` | not specified in the source contract |
| `computed_at` | yes | `{"format": "date", "type": "string"}` | not specified in the source contract |
| `constraints_status` | yes | `{"enum": ["complete_inputs", "model_only"]}` | not specified in the source contract |
| `dimensions_method` | yes | `{"const": "minimum_rotated_bounding_rectangle"}` | not specified in the source contract |
| `geometry` | yes | `{"additionalProperties": false, "properties": {"coordinates": {"type": "array"}, "geometries": {"type": "array"}, "type": {"enum": ["Polygon", "MultiPolygon", "GeometryCollection"]}}, "required": ["type"], "type": "object"}` | not specified in the source contract |
| `inputs` | yes | `{"additionalProperties": false, "properties": {"audyt_model": {"additionalProperties": false, "properties": {"assumed_setbacks_m": {"additionalProperties": false, "properties": {"setback_forest_m": {"minimum": 0, "type": ["number", "null"]}, "setback_rear_m": {"minimum": 0, "type": ["number", "null"]}, "setback_road_m": {"minimum": 0, "type": ["number", "null"]}, "setback_side_m": {"minimum": 0, "type": ["number", "null"]}}, "required": ["setback_road_m", "setback_side_m", "setback_rear_m", "setback_forest_m"], "type": "object"}, "inputs": {"additionalProperties": false, "properties": {"flood_q100_overlap": {}, "flood_q100_overlap_wkt": {}, "forest_distance_m": {}, "forest_reference_point_wkt": {}, "road_segment_public": {}, "road_segments": {}, "road_type": {}}, "type": "object"}, "reader": {"const": "compute_buildable_envelope"}, "source": {"const": "parcel_geometry_v2"}}, "required": ["reader", "source", "inputs", "assumed_setbacks_m"], "type": ["object", "null"]}, "building_areas": {"items": {"additionalProperties": false, "properties": {"distance_m": {"minimum": 0, "type": "number", "x-unit": "m"}, "effective_from": {"format": "date", "type": "string"}, "geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}, "kind": {"type": ["string", "null"]}, "plan_id": {"minLength": 1, "type": "string"}, "resolution_url": {"format": "uri", "pattern": "^https://", "type": "string"}, "source": {"additionalProperties": false, "description": "Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.", "properties": {"as_of": {"format": "date", "type": "string"}, "attribution": {"type": "string"}, "author_citation_required": {"type": "boolean"}, "authors": {"items": {"minLength": 1, "type": "string"}, "maxItems": 100, "minItems": 1, "type": "array"}, "fallback": {"default": false, "description": "Wartość true, gdy to źródło udzieliło odpowiedzi z powodu braku rekordu w źródle podstawowym, np. własny przegląd planów ogólnych przy braku wpisu w Rejestrze Urbanistycznym.", "type": "boolean"}, "id": {"description": "Identyfikator źródła: source_status.source_id.", "type": "string"}, "licence": {"type": "string"}, "published_extract_url": {"format": "uri", "pattern": "^https://", "type": ["string", "null"]}, "publisher": {"type": "string"}, "title": {"type": "string"}, "url": {"type": ["string", "null"]}}, "required": ["id", "as_of"], "type": "object"}, "status": {"const": "in_force"}, "zone_geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}}, "required": ["source", "plan_id", "resolution_url", "effective_from", "status", "geometry_sha256"], "type": "object"}, "type": "array"}, "constraints_complete": {"type": "boolean"}, "crs": {"const": "EPSG:2180"}, "parcel_geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}, "parcel_source": {"additionalProperties": false, "description": "Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.", "properties": {"as_of": {"format": "date", "type": "string"}, "attribution": {"type": "string"}, "author_citation_required": {"type": "boolean"}, "authors": {"items": {"minLength": 1, "type": "string"}, "maxItems": 100, "minItems": 1, "type": "array"}, "fallback": {"default": false, "description": "Wartość true, gdy to źródło udzieliło odpowiedzi z powodu braku rekordu w źródle podstawowym, np. własny przegląd planów ogólnych przy braku wpisu w Rejestrze Urbanistycznym.", "type": "boolean"}, "id": {"description": "Identyfikator źródła: source_status.source_id.", "type": "string"}, "licence": {"type": "string"}, "published_extract_url": {"format": "uri", "pattern": "^https://", "type": ["string", "null"]}, "publisher": {"type": "string"}, "title": {"type": "string"}, "url": {"type": ["string", "null"]}}, "required": ["id", "as_of"], "type": "object"}, "setbacks": {"items": {"additionalProperties": false, "properties": {"distance_m": {"minimum": 0, "type": "number", "x-unit": "m"}, "effective_from": {"format": "date", "type": "string"}, "geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}, "kind": {"type": ["string", "null"]}, "plan_id": {"minLength": 1, "type": "string"}, "resolution_url": {"format": "uri", "pattern": "^https://", "type": "string"}, "source": {"additionalProperties": false, "description": "Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.", "properties": {"as_of": {"format": "date", "type": "string"}, "attribution": {"type": "string"}, "author_citation_required": {"type": "boolean"}, "authors": {"items": {"minLength": 1, "type": "string"}, "maxItems": 100, "minItems": 1, "type": "array"}, "fallback": {"default": false, "description": "Wartość true, gdy to źródło udzieliło odpowiedzi z powodu braku rekordu w źródle podstawowym, np. własny przegląd planów ogólnych przy braku wpisu w Rejestrze Urbanistycznym.", "type": "boolean"}, "id": {"description": "Identyfikator źródła: source_status.source_id.", "type": "string"}, "licence": {"type": "string"}, "published_extract_url": {"format": "uri", "pattern": "^https://", "type": ["string", "null"]}, "publisher": {"type": "string"}, "title": {"type": "string"}, "url": {"type": ["string", "null"]}}, "required": ["id", "as_of"], "type": "object"}, "status": {"const": "in_force"}, "zone_geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}}, "required": ["source", "plan_id", "resolution_url", "effective_from", "status", "geometry_sha256"], "type": "object"}, "type": "array"}}, "required": ["parcel_geometry_sha256", "parcel_source", "crs", "setbacks", "building_areas", "constraints_complete", "audyt_model"], "type": "object"}` | not specified in the source contract |
| `setbacks_applied` | yes | `{"items": {"additionalProperties": false, "properties": {"distance_m": {"minimum": 0, "type": "number", "x-unit": "m"}, "effective_from": {"format": "date", "type": "string"}, "geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}, "kind": {"type": ["string", "null"]}, "plan_id": {"minLength": 1, "type": "string"}, "resolution_url": {"format": "uri", "pattern": "^https://", "type": "string"}, "source": {"additionalProperties": false, "description": "Pozycja /v1/sources cytowana w odpowiedzi tematycznej. as_of to data danych źródłowych z ostatniej udanej aktualizacji, a nie czas żądania.", "properties": {"as_of": {"format": "date", "type": "string"}, "attribution": {"type": "string"}, "author_citation_required": {"type": "boolean"}, "authors": {"items": {"minLength": 1, "type": "string"}, "maxItems": 100, "minItems": 1, "type": "array"}, "fallback": {"default": false, "description": "Wartość true, gdy to źródło udzieliło odpowiedzi z powodu braku rekordu w źródle podstawowym, np. własny przegląd planów ogólnych przy braku wpisu w Rejestrze Urbanistycznym.", "type": "boolean"}, "id": {"description": "Identyfikator źródła: source_status.source_id.", "type": "string"}, "licence": {"type": "string"}, "published_extract_url": {"format": "uri", "pattern": "^https://", "type": ["string", "null"]}, "publisher": {"type": "string"}, "title": {"type": "string"}, "url": {"type": ["string", "null"]}}, "required": ["id", "as_of"], "type": "object"}, "status": {"const": "in_force"}, "zone_geometry_sha256": {"pattern": "^[a-f0-9]{64}$", "type": "string"}}, "required": ["source", "plan_id", "resolution_url", "effective_from", "status", "geometry_sha256"], "type": "object"}, "type": "array"}` | not specified in the source contract |

```json
{
  "$ref": "./envelope.json#/$defs/BuildableEnvelopeValue"
}
```

## Empty answer: covered_no_data

not specified in the source contract. The contract does not define a complete empty value for this schema.

## Coverage states

Cztery stany zakresu danych dla jednej kategorii w danym miejscu. covered: źródło obejmuje to miejsce i zawiera rekord; value zawiera ten rekord. covered_no_data: źródło obejmuje to miejsce, lecz nie zawiera rekordu; value ma określoną dla danej kategorii pustą wartość (false, 0, [], none), nigdy null; jest to potwierdzony brak rekordu, za który naliczana jest opłata. not_covered: źródło nie obejmuje miejsca albo państwo nie publikuje tych danych w postaci do odczytu maszynowego; value=null, agent nie może wyciągać wniosków, a opłata jest zwracana, gdy zapytanie dotyczy tych danych. not_computed: posiadamy źródło, lecz nie obliczyliśmy jeszcze wyniku dla tego miejsca, np. trwa ładowanie zbioru; value=null, opłata jest zwracana. Każdy stan zawiera uwagę napisaną prostym językiem.

States: `covered` | `covered_no_data` | `not_covered` | `not_computed`.

`LayerAnswer` required fields: `layer`, `coverage`, `value`, `note`, `source`, `as_of`, `layer_version`.

## Billing rule

Koszt żądania. charged: liczba naliczonych wywołań po zwrotach. refunded: liczba wywołań naliczonych, a następnie zwróconych. rule: zastosowana reguła. Płatne są odpowiedzi, potwierdzone braki rekordów (covered_no_data) i niejednoznaczne listy kandydatów. Bezpłatne są błędne dane wejściowe (400), brak uwierzytelnienia (401), odpowiedzi bez zmiany danych (304) i operacje bezpłatne. Zwrot obejmuje pozostałe 4xx, każde 5xx, status not_covered oraz odpowiedź dotyczącą jednej kategorii ze stanem not_covered lub not_computed. W operacjach zbiorczych liczby dotyczą poszczególnych elementów.

Rule values: `charged` | `free_operation` | `free_invalid_input` | `free_unauthorized` | `free_not_modified` | `free_idempotency_replay` | `refunded_client_error` | `refunded_server_error` | `refunded_not_covered` | `refunded_not_computed` | `batch_mixed` | `free_record_reuse`.

## curl example

```sh
curl --silent --show-error --request GET "https://api.landfeed.pl/v1/layer/flood" --get \
  -H "X-Api-Key: ${LANDFEED_API_KEY}" \
  --data-urlencode 'id=141803_2.0001.12/3'
```
