{"openapi":"3.1.0","info":{"title":"MapaDanych – kontrakt dostawcy danych","version":"0.1","description":"Endpointy, które publikuje dostawca danych. Ścieżki są poglądowe: rzeczywisty URL określa manifest (source.url, względem URL manifestu). Instrukcja: https://mapadanych.pl/dokumentacja/dla-agentow-ai.md. Weryfikacja: POST https://mapadanych.pl/api/validate."},"servers":[{"url":"https://data.example.org/datovamapa","description":"Twój serwer"}],"paths":{"/manifest.json":{"get":{"operationId":"manifest","summary":"Manifest dostawcy","responses":{"200":{"description":"Manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Manifest"}}}}}}},"/{dataset}":{"get":{"operationId":"data","summary":"Dane jednego zbioru danych (source.url)","description":"Własne filtry zbioru (params) przychodzą jako dodatkowe parametry query: key=wartość, zakres key=od,do, wiele wartości key=a,b,c. Nieznane parametry ignoruj.","parameters":[{"name":"dataset","in":"path","required":true,"schema":{"type":"string"}},{"name":"bbox","in":"query","schema":{"type":"string","example":"16.523438,49.15297,16.699219,49.267805"},"description":"Tylko dla mode bbox. minLon,minLat,maxLon,maxLat w WGS84, wyrównane do kafelków poziomu zoom. Zwróć obiekty, które przecinają ten obszar."},{"name":"zoom","in":"query","schema":{"type":"integer","minimum":0,"maximum":24},"description":"Tylko dla mode bbox. Przy małym przybliżeniu możesz zwracać agregacje."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":5000},"description":"Nie zwracaj więcej obiektów; przy przycięciu ustaw dm.truncated i dm.total."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Kursor z dm.next (opcjonalne stronicowanie)."},{"name":"lang","in":"query","schema":{"type":"string","example":"pl"}},{"name":"protocol","in":"query","schema":{"type":"string","example":"0.1"}}],"responses":{"200":{"description":"GeoJSON FeatureCollection, WGS84 [lon, lat]","content":{"application/geo+json":{"schema":{"$ref":"#/components/schemas/DataResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/DataResponse"}}}}}}}},"components":{"schemas":{"Manifest":{"type":"object","properties":{"$schema":{"type":"string"},"protocol":{"type":"string","pattern":"^\\d+\\.\\d+$","description":"Wersja protokołu, według której napisano manifest, np. 0.1"},"provider":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","examples":["mesto-brno","kontejnery-na-odpad"]},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"homepage":{"type":"string","format":"uri"},"logo":{"type":"string","format":"uri"},"contact":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"url":{"type":"string","format":"uri"}}},"managedBy":{"default":"provider","description":"portal = manifest usługi publicznej utrzymuje MapaDanych, a nie właściciel danych","type":"string","enum":["provider","portal"]}},"required":["id","name"]},"license":{"description":"Domyślna licencja dla wszystkich zbiorów danych","type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Nazwa licencji, np. CC BY 4.0"},"url":{"type":"string","format":"uri"},"attribution":{"type":"string","minLength":1,"maxLength":300,"description":"Tekst atrybucji, który portal wyświetli przy mapie, np. © Państwowy Instytut Geologiczny"}},"required":["name","attribution"]},"datasets":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","examples":["mesto-brno","kontejnery-na-odpad"]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"category":{"description":"Zalecane wartości: territory, nature, water, risks, energy, transport, society, economy, infrastructure, sample, other","type":"string","maxLength":40},"tags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":40}},"keywords":{"description":"Słowa i synonimy, po których zbiór znajdzie użytkownik i asystent AI portalu. Pisz po polsku, także w formach potocznych.","examples":[["odpad","kontejner","třídění","popelnice"]],"maxItems":60,"type":"array","items":{"type":"string","maxLength":60}},"useCases":{"description":"Do czego zbiór jest przydatny. Zalecane wartości: construction, housing, land-purchase, agriculture, investment, transport, tourism, business, public-administration; inne są dozwolone.","examples":[["construction","housing"]],"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"coverage":{"type":"object","properties":{"bbox":{"type":"array","prefixItems":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90},{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}],"items":false,"minItems":4,"maxItems":4,"description":"[minLon, minLat, maxLon, maxLat] w WGS84"},"area":{"description":"Słowny opis zasięgu, np. Polska, województwo małopolskie","type":"string","maxLength":60},"minZoom":{"description":"Poniżej tego przybliżenia portal nie wczytuje danych","type":"number","minimum":0,"maximum":24},"maxZoom":{"type":"number","minimum":0,"maximum":24}}},"temporal":{"type":"object","properties":{"updated":{"description":"Data ostatniej aktualizacji danych (ISO 8601)","type":"string","maxLength":40},"frequency":{"description":"Jak często zmieniają się dane, np. codziennie","type":"string","maxLength":60},"param":{"description":"Klucz parametru, którym użytkownik wybiera okres (typ range w latach lub date-range). Portal pokaże go jako filtr czasu przy legendzie, z wykresem z dm.timeline.","type":"string","maxLength":32}}},"license":{"description":"Nadpisuje licencję dostawcy","type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Nazwa licencji, np. CC BY 4.0"},"url":{"type":"string","format":"uri"},"attribution":{"type":"string","minLength":1,"maxLength":300,"description":"Tekst atrybucji, który portal wyświetli przy mapie, np. © Państwowy Instytut Geologiczny"}},"required":["name","attribution"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"geojson"},"url":{"type":"string","minLength":1,"maxLength":2048,"description":"Endpoint zwracający FeatureCollection; może być względny wobec manifestu","examples":["https://data.example.cz/datovamapa/kontejnery","kontejnery.geojson"]},"mode":{"default":"full","description":"full = cały zbiór jednym zapytaniem, bbox = portal pyta o bieżący widok mapy","type":"string","enum":["full","bbox"]},"maxFeatures":{"description":"Maksymalna liczba obiektów, jaką zwróci dostawca; portal przesyła ją jako limit","type":"integer","minimum":1,"maximum":5000}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","const":"raster"},"tiles":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","pattern":"^https:\\/\\/\\S+$"},"description":"Szablony URL z {z}/{x}/{y} lub {bbox-epsg-3857}"},"tileSize":{"default":256,"anyOf":[{"type":"number","const":256},{"type":"number","const":512}]},"minZoom":{"type":"number","minimum":0,"maximum":24},"maxZoom":{"type":"number","minimum":0,"maximum":24}},"required":["type","tiles"]}]},"presentation":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"circle"},"color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"categorical"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"description":"Wartość właściwości → kolor"},"default":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["field","type","values"]},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"interpolate"},"stops":{"minItems":2,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}],"items":false,"minItems":2,"maxItems":2},"description":"Uporządkowane pary [wartość, kolor]"}},"required":["field","type","stops"]},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"step"},"default":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Kolor dla wartości poniżej pierwszego progu"},"stops":{"minItems":1,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}],"items":false,"minItems":2,"maxItems":2},"description":"Uporządkowane pary [od wartości, kolor]"}},"required":["field","type","default","stops"]},{"type":"object","properties":{"type":{"type":"string","const":"trend"},"threshold":{"description":"Średnia zmiana w jednym okresie wykresu w % wartości początkowej, poniżej której wartość uznaje się za stałą (domyślnie 0,5)","type":"number","minimum":0,"maximum":100},"colors":{"description":"Nadpisuje domyślne kolory (wzrost zielony, stagnacja szara, spadek czerwony) – np. gdy wzrost jest niepożądany","type":"object","properties":{"up":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"flat":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"down":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}}}},"required":["type"]}]},"radius":{"description":"Promień w pikselach","anyOf":[{"type":"number","minimum":0},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"interpolate"},"stops":{"minItems":2,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number","minimum":0}],"items":false,"minItems":2,"maxItems":2}}},"required":["field","type","stops"]}]},"opacity":{"type":"number","minimum":0,"maximum":1},"strokeColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"strokeWidth":{"type":"number","minimum":0,"maximum":10},"label":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64,"description":"Właściwość, której wartość wyświetli się jako etykieta"},"minZoom":{"type":"number","minimum":0,"maximum":24},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"size":{"type":"number","minimum":6,"maximum":32}},"required":["field"]},"cluster":{"description":"Grupowanie pobliskich punktów","anyOf":[{"type":"boolean"},{"type":"object","properties":{"radius":{"type":"number","minimum":10,"maximum":200},"maxZoom":{"type":"number","minimum":0,"maximum":20}}}]},"legend":{"description":"Własna legenda; w przeciwnym razie portal utworzy ją z kolorów","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["label","color"]}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"heatmap"},"weight":{"description":"Waga punktu, zwykle z właściwości liczbowej","anyOf":[{"type":"number","minimum":0},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"interpolate"},"stops":{"minItems":2,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number","minimum":0}],"items":false,"minItems":2,"maxItems":2}}},"required":["field","type","stops"]}]},"radius":{"type":"number","minimum":1,"maximum":100},"intensity":{"type":"number","minimum":0,"maximum":10},"colors":{"description":"Skala kolorów od niskiej do wysokiej gęstości","minItems":2,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"opacity":{"type":"number","minimum":0,"maximum":1},"legend":{"description":"Własna legenda; w przeciwnym razie portal utworzy ją z kolorów","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["label","color"]}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"line"},"color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"categorical"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"description":"Wartość właściwości → kolor"},"default":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["field","type","values"]},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"interpolate"},"stops":{"minItems":2,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}],"items":false,"minItems":2,"maxItems":2},"description":"Uporządkowane pary [wartość, kolor]"}},"required":["field","type","stops"]},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"step"},"default":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Kolor dla wartości poniżej pierwszego progu"},"stops":{"minItems":1,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}],"items":false,"minItems":2,"maxItems":2},"description":"Uporządkowane pary [od wartości, kolor]"}},"required":["field","type","default","stops"]},{"type":"object","properties":{"type":{"type":"string","const":"trend"},"threshold":{"description":"Średnia zmiana w jednym okresie wykresu w % wartości początkowej, poniżej której wartość uznaje się za stałą (domyślnie 0,5)","type":"number","minimum":0,"maximum":100},"colors":{"description":"Nadpisuje domyślne kolory (wzrost zielony, stagnacja szara, spadek czerwony) – np. gdy wzrost jest niepożądany","type":"object","properties":{"up":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"flat":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"down":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}}}},"required":["type"]}]},"width":{"anyOf":[{"type":"number","minimum":0},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"interpolate"},"stops":{"minItems":2,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number","minimum":0}],"items":false,"minItems":2,"maxItems":2}}},"required":["field","type","stops"]}]},"opacity":{"type":"number","minimum":0,"maximum":1},"dash":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"number","minimum":0}},"label":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64,"description":"Właściwość, której wartość wyświetli się jako etykieta"},"minZoom":{"type":"number","minimum":0,"maximum":24},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"size":{"type":"number","minimum":6,"maximum":32}},"required":["field"]},"legend":{"description":"Własna legenda; w przeciwnym razie portal utworzy ją z kolorów","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["label","color"]}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"fill"},"color":{"anyOf":[{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"categorical"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"description":"Wartość właściwości → kolor"},"default":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["field","type","values"]},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"interpolate"},"stops":{"minItems":2,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}],"items":false,"minItems":2,"maxItems":2},"description":"Uporządkowane pary [wartość, kolor]"}},"required":["field","type","stops"]},{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","const":"step"},"default":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Kolor dla wartości poniżej pierwszego progu"},"stops":{"minItems":1,"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}],"items":false,"minItems":2,"maxItems":2},"description":"Uporządkowane pary [od wartości, kolor]"}},"required":["field","type","default","stops"]},{"type":"object","properties":{"type":{"type":"string","const":"trend"},"threshold":{"description":"Średnia zmiana w jednym okresie wykresu w % wartości początkowej, poniżej której wartość uznaje się za stałą (domyślnie 0,5)","type":"number","minimum":0,"maximum":100},"colors":{"description":"Nadpisuje domyślne kolory (wzrost zielony, stagnacja szara, spadek czerwony) – np. gdy wzrost jest niepożądany","type":"object","properties":{"up":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"flat":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"down":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}}}},"required":["type"]}]},"opacity":{"type":"number","minimum":0,"maximum":1},"outlineColor":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"outlineWidth":{"type":"number","minimum":0,"maximum":10},"label":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":64,"description":"Właściwość, której wartość wyświetli się jako etykieta"},"minZoom":{"type":"number","minimum":0,"maximum":24},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"size":{"type":"number","minimum":6,"maximum":32}},"required":["field"]},"legend":{"description":"Własna legenda; w przeciwnym razie portal utworzy ją z kolorów","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["label","color"]}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"raster"},"opacity":{"type":"number","minimum":0,"maximum":1},"legend":{"description":"Własna legenda; w przeciwnym razie portal utworzy ją z kolorów","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["label","color"]}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"auto"},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"legend":{"description":"Własna legenda; w przeciwnym razie portal utworzy ją z kolorów","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"color":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"required":["label","color"]}}},"required":["type"]}]},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":80},"type":{"default":"string","type":"string","enum":["string","number","integer","boolean","date","datetime","url","image","email","phone"]},"unit":{"type":"string","maxLength":20},"decimals":{"type":"integer","minimum":0,"maximum":8},"description":{"type":"string","maxLength":300},"primary":{"description":"Wartość służy jako tytuł obiektu w szczegółach","type":"boolean"}},"required":["key","label"]}},"params":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"type":{"type":"string","enum":["enum","multi-enum","number","range","boolean","date","date-range","text"]},"description":{"type":"string","maxLength":300},"options":{"description":"Dla enum i multi-enum","maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["value","label"]}},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","maxLength":20},"default":{"type":["string","number","boolean"]},"required":{"type":"boolean"}},"required":["key","label","type"]}},"live":{"description":"Dane na żywo: otwarta mapa sama je odświeża. Interwał nie powinien być krótszy niż cache.ttl.","type":"object","properties":{"interval":{"type":"integer","minimum":10,"maximum":3600,"description":"Jak często (w sekundach) mapa odświeża dane, dopóki zbiór jest włączony"}},"required":["interval"]},"profile":{"description":"Rodzaj zbioru ze wspólnym zachowaniem w portalu. transit_vehicles = bieżące pozycje pojazdów transportu publicznego: obiekty są punktami z dm.transit, zbiór ma live; portal pokaże go we wspólnej warstwie transportu z innymi takimi zbiorami.","type":"string","enum":["transit_vehicles"]},"detail":{"description":"Szczegóły obiektu na żądanie po kliknięciu (rozkład jazdy, bogatszy opis, wyróżnienie na mapie)","type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"Szablon adresu szczegółów obiektu z symbolem zastępczym {id} (id obiektu z danych). Odpowiedzią jest FeatureDetail; może być względna wobec manifestu."}},"required":["url"]},"cache":{"type":"object","properties":{"ttl":{"description":"Jak długo (s) portal może trzymać odpowiedź w cache","type":"integer","minimum":0,"maximum":31536000},"store":{"description":"Czy portal może zapisać dane w swojej warstwie cache na potrzeby analiz i zestawień (domyślnie tak)","type":"boolean"}}}},"required":["id","title","source","presentation"]}}},"required":["protocol","provider","datasets"]},"DataResponse":{"type":"object","properties":{"type":{"type":"string","const":"FeatureCollection"},"features":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"Feature"},"id":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]},"geometry":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"Point"},"coordinates":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"number"}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","const":"MultiPoint"},"coordinates":{"type":"array","items":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"number"}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","const":"LineString"},"coordinates":{"minItems":2,"type":"array","items":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"number"}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","const":"MultiLineString"},"coordinates":{"type":"array","items":{"minItems":2,"type":"array","items":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"number"}}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","const":"Polygon"},"coordinates":{"type":"array","items":{"minItems":4,"type":"array","items":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"number"}}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","const":"MultiPolygon"},"coordinates":{"type":"array","items":{"type":"array","items":{"minItems":4,"type":"array","items":{"minItems":2,"maxItems":3,"type":"array","items":{"type":"number"}}}}}},"required":["type","coordinates"]}]},{"type":"null"}]},"properties":{"default":{},"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"dm":{"type":"object","properties":{"title":{"description":"Tytuł obiektu w szczegółach","type":"string","maxLength":200},"description":{"type":"string","maxLength":2000},"url":{"description":"Odnośnik do szczegółów obiektu u dostawcy","type":"string","format":"uri"},"color":{"description":"Nadpisuje kolor z prezentacji","type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"chart":{"description":"Wykres zmian wartości w szczegółach obiektu","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"Co pokazuje wykres, np. Liczba mieszkańców"},"unit":{"type":"string","maxLength":20},"decimals":{"type":"integer","minimum":0,"maximum":6},"note":{"description":"Uwaga pod wykresem, np. o zmianie metodyki","type":"string","maxLength":200},"highlight":{"description":"Wyróżniony okres (np. wybrany w filtrze czasu) – portal go podświetli, pokaże wartość na jego końcu, a zmianę i trend policzy od jego początku. Te same from i to = jeden wybrany okres (np. rok).","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"},"to":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"}},"required":["from","to"]},"points":{"minItems":2,"maxItems":100,"type":"array","items":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"},"value":{"type":"number"}},"required":["period","value"]},"description":"Wartości uporządkowane od najstarszego okresu"}},"required":["label","points"]},"transit":{"description":"Pojazd transportu publicznego (zbiory z profilem transit_vehicles)","type":"object","properties":{"mode":{"type":"string","enum":["rail","bus","tram","metro","trolleybus","ferry","funicular","other"],"description":"Rodzaj transportu"},"label":{"type":"string","minLength":1,"maxLength":40,"description":"Oznaczenie, którego szukają ludzie: pociąg (R 1234), linia (188)"},"line":{"description":"Linia, gdy różni się od oznaczenia (S2)","type":"string","maxLength":40},"headsign":{"description":"Cel kursu","type":"string","maxLength":120},"operator":{"description":"Przewoźnik","type":"string","maxLength":120},"delay_min":{"description":"Opóźnienie w pełnych minutach, ujemne = przed czasem","type":"integer","minimum":-1440,"maximum":1440},"delay_band":{"type":"string","enum":["on_time","minor","medium","major","extreme","unknown"],"description":"Przedział opóźnienia: on_time do 4 min, minor 5 do 14, medium 15 do 29, major 30 do 59, extreme 60 i więcej, unknown bez danych"},"bearing":{"description":"Kierunek jazdy w stopniach od północy","type":"number","minimum":0,"maximum":360},"trip_ref":{"description":"Stały klucz kursu (ten sam przy kolejnych odświeżeniach danych)","type":"string","maxLength":200},"observed_at":{"type":"string","maxLength":40,"description":"Kiedy zmierzono pozycję (ISO 8601)"}},"required":["mode","label","delay_band","observed_at"]}}}},"required":["type","geometry"]}},"dm":{"type":"object","properties":{"protocol":{"type":"string"},"generated":{"description":"Kiedy utworzono odpowiedź (ISO 8601)","type":"string","maxLength":40},"ttl":{"description":"Jak długo (s) odpowiedź jest ważna","type":"integer","minimum":0,"maximum":9007199254740991},"total":{"description":"Łączna liczba obiektów spełniających zapytanie","type":"integer","minimum":0,"maximum":9007199254740991},"truncated":{"description":"Odpowiedź nie zawiera wszystkich obiektów (limit)","type":"boolean"},"next":{"description":"Kursor następnej strony","type":"string","maxLength":500},"notice":{"description":"Krótki komunikat dla użytkownika, np. przybliż mapę","type":"string","maxLength":300},"timeline":{"description":"Liczby obiektów w widoku według okresów za cały czas, który obejmuje zbiór – niezależnie od wybranego okresu i limitu. Portal rysuje z nich wykres przy legendzie.","maxItems":400,"type":"array","items":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"values":{"description":"Rozkład liczby według wartości właściwości, która decyduje o kolorze obiektów (color.field) – wykres koloruje je tak jak legenda","type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}}},"required":["period","count"]}},"chart":{"description":"Zbiorczy przebieg wartości dla całego obszaru zbioru lub widoku (np. liczba ludności Polski) – portal pokaże go przy filtrze czasu, gdy odpowiedź nie przesyła dm.timeline","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"Co pokazuje wykres, np. Liczba mieszkańców"},"unit":{"type":"string","maxLength":20},"decimals":{"type":"integer","minimum":0,"maximum":6},"note":{"description":"Uwaga pod wykresem, np. o zmianie metodyki","type":"string","maxLength":200},"highlight":{"description":"Wyróżniony okres (np. wybrany w filtrze czasu) – portal go podświetli, pokaże wartość na jego końcu, a zmianę i trend policzy od jego początku. Te same from i to = jeden wybrany okres (np. rok).","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"},"to":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"}},"required":["from","to"]},"points":{"minItems":2,"maxItems":100,"type":"array","items":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$","description":"Rok, miesiąc lub dzień w ISO 8601"},"value":{"type":"number"}},"required":["period","value"]},"description":"Wartości uporządkowane od najstarszego okresu"}},"required":["label","points"]}}}},"required":["type","features"]}}}}