GeoZone
Dokumentacja API

GeoZone Public API

Interfejs API GraphQL zwracający dane stref obciążeń konstrukcyjnych, charakterystyki geograficzne i raporty PDF dla dowolnych współrzędnych na świecie.

7 zapytań1 subskrypcjaBearer Auth
POSThttps://team-w.dlubal.com/api/geo-zone/pub/graphql

Aplikacja internetowa

Narzędzie GeoZone jest również dostępne jako interaktywna aplikacja internetowa na dlubal.com. Wybierz dowolną lokalizację na mapie, aby natychmiast zobaczyć wszystkie wartości stref obciążeń konstrukcyjnych.

Aplikacja internetowa GeoZone
Aplikacja internetowa GeoZone

Uwierzytelnianie

Większość zapytań wymaga tokenu Bearer w nagłówku Authorization:

Authorization:Bearer YOUR_TOKEN

Zapytania oznaczone jako Publiczne nie wymagają uwierzytelniania. Wszystkie pozostałe zużywają jeden kredyt API na żądanie.

getLoadZoneCharacteristics

ZapytanieWymaga auth

Zwraca klasyfikację strefy obciążenia i wszystkie charakterystyki dla podanych współrzędnych. Przyjmuje loadZoneId (z findLoadzones), layerId oraz szerokość/długość geograficzną jako ciągi dziesiętne. Odpowiedź zawiera szczegóły adresu, dopasowaną strefę i uporządkowaną listę charakterystyk konstrukcyjnych.

Pole code może przyjmować wartości OK, COUNTRY_CHANGED (serwer automatycznie wybrał bardziej odpowiedni standard), ANNEX_CHANGED lub ERROR.

Strefy śniegowe
Strefy śniegowe
Strefy wiatrowe
Strefy wiatrowe
Strefy sejsmiczne
Strefy sejsmiczne
graphql
query {
  getLoadZoneCharacteristics(
    input: {
      address: "Munich, Germany"
      type: SNOW
      standard: "EN 1991-1-3"
      annex: "Germany"
      layerId: 1
    }
    language: EN
  ) {
    code
    message
    geoLocation {
      latitude longitude altitude
      street zip city state country countryCode
    }
    characteristics {
      standard
      annex
      zoneCharacteristics {
        id
        zone { value }
        characteristics {
          name calculatedValue
          nameHtml unitsHtml description
          decimalPlaces sequence
        }
      }
    }
    noLiability
  }
}

getLoadZoneCharacteristicsV1

ZapytanieWymaga auth

Starsza wersja getZoneCharacteristics. Zwraca skróconą odpowiedź bez danych adresowych lub pełnych sekwencji charakterystyk. Zachowana dla wstecznej kompatybilności — nowe integracje powinny używać getZoneCharacteristics.

graphql
query {
  getLoadZoneCharacteristicsV1(
    input: {
      address: "Munich, Germany"
      type: SNOW
      standard: "EN 1991-1-3"
      annex: "Germany"
      layerId: 1
    }
    language: EN
  )
}

getGeoLocations

ZapytaniePubliczne

Wyszukiwanie geokodowania — konwertuje adres w postaci tekstu na wyniki współrzędnych. Uwierzytelnianie nie jest wymagane. Zwraca do 10 posortowanych wyników z ulicą, miastem, stanem, krajem, kodem pocztowym i współrzędnymi dziesiętnymi.

Wyszukiwanie adresu
Wyszukiwanie adresu
graphql
query {
  getGeoLocations(
    address: "Altdorf, Uri, Switzerland"
    language: EN
  ) {
    latitude longitude altitude
    displayName street zip city state country countryCode
  }
}

getLoadZoneScreenshot

ZapytanieWymaga auth

Generuje zrzut ekranu mapy wycentrowany na podanych współrzędnych jako PNG lub JPEG zakodowany w base64. Przydatne do osadzania map stref w raportach lub pulpitach nawigacyjnych.

graphql
query {
  getLoadZoneScreenshot(
    input: {
      address: "Munich, Germany"
      type: SNOW
      standard: "EN 1991-1-3"
      annex: "Germany"
      layerId: 1
      zoom: 8
      screenshotType: { type: PNG quality: 90 }
    }
    language: EN
  )
}

getLoadZoneStandards

ZapytaniePubliczne

Zwraca pełną hierarchię typów stref obciążeń, standardów, załączników krajowych i warstw. Użyj tego, aby wypełnić selektory lub odkryć prawidłowe wartości loadZoneId z ich identyfikatorami warstw, etykietami stref i kolorami.

graphql
query {
  getLoadZoneStandards(
    countryCode: "DE"
    language: EN
  ) {
    name
    standards {
      name
      annexes {
        name
        actual
        layers { id name }
      }
    }
  }
}

findLoadzones

ZapytanieWymaga auth

Zwraca kompaktową listę stref obciążeń pogrupowanych według typu — idealne do odkrywania prawidłowych par loadZoneId / layerId.

graphql
query {
  findLoadzones(
    countryCode: "DE"
    language: EN
  ) {
    country
    countryCode
    typeGroups {
      name
      loadzones {
        standard annex loadzoneId
        layers { id name }
      }
    }
  }
}

Przykładowa odpowiedź

json
{
  "data": {
    "findLoadzones": {
      "country": "Germany",
      "countryCode": "DE",
      "typeGroups": [
        {
          "name": "Snow",
          "loadzones": [
            {
              "standard": "EN 1991-1-3",
              "annex": "Germany",
              "loadzoneId": "snow-eu-en-1991",
              "layers": [{ "id": 1, "name": null }]
            }
          ]
        },
        {
          "name": "Wind",
          "loadzones": [
            {
              "standard": "EN 1991-1-4",
              "annex": "Germany",
              "loadzoneId": "wind-eu-en-2005",
              "layers": [{ "id": 1, "name": null }]
            }
          ]
        }
      ]
    }
  }
}

getUserData

ZapytanieWymaga auth

Zwraca adres e-mail uwierzytelnionego użytkownika, saldo kredytów i pozostałą liczbę kliknięć API dla bieżącego okresu rozliczeniowego.

graphql
query {
  getUserData {
    email
    clicks
  }
}

getPdf

SubskrypcjaWymaga auth

Generuje pełny raport PDF strefy obciążenia przez połączenie WebSocket (subskrypcje GraphQL via graphql-ws). Serwer przesyła strumieniowo aktualizacje postępu; ostatnia wiadomość zawiera PDF zakodowany w base64 i sugerowaną nazwę pliku.

Punkt końcowy WebSocket: wss://team-w.dlubal.com/api/geo-zone/pub/graphql

graphql
subscription {
  getPdf(
    pdfInput: {
      address: "Munich, Germany"
      standard: "EN 1991-1-3"
      annex: "Germany"
      layerId: 1
    }
    language: EN
  ) {
    currentStep
    steps
    message
    pdfResult { pdf name }
  }
}

Przykład klienta JavaScript

javascript
import { createClient } from "graphql-ws";

const client = createClient({
  url: "wss://team-w.dlubal.com/api/geo-zone/pub/graphql",
  connectionParams: { Authorization: "Bearer YOUR_TOKEN" },
});

const unsubscribe = client.subscribe(
  {
    query: `subscription {
      getPdf(pdfInput: {
        address: "Munich, Germany"
        standard: "EN 1991-1-3"
        annex: "Germany"
        layerId: 1
      } language: EN) {
        currentStep steps message
        pdfResult { pdf name }
      }
    }`,
  },
  {
    next({ data }) {
      const step = data?.getPdf;
      console.log(`${step.currentStep}/${step.steps} — ${step.message}`);
      if (step.pdfResult) {
        // step.pdfResult.pdf is base64-encoded
        unsubscribe();
      }
    },
    error(err) { console.error(err); },
    complete()  { console.log("Done"); },
  }
);

Wyliczenia

LanguageEnum

WartośćJęzyk
ENEnglish
DEGerman
FRFrench
ITItalian
ESSpanish
PTPortuguese
PLPolish
CSCzech
RURussian
ZHChinese

LoadzoneTypeEnum

WartośćOpis
SNOWSnow load zones (EN 1991-1-3)
WINDWind load zones (EN 1991-1-4)
EARTHQUAKESeismic zones (EN 1998)
TORNADOTornado zones (US only)

ScreenshotTypeEnum

WartośćOpis
PNGLossless PNG image
JPEGCompressed JPEG image

Typy wejściowe

CharacteristicsInput

PoleTypOpis
addressString!Free-text address or place name
typeLoadzoneTypeEnumZone type filter (SNOW, WIND, EARTHQUAKE, TORNADO)
standardStringStandard name filter
annexStringAnnex / national annex filter
layerIdIntLayer ID within the standard

GetLoadzoneScreenshotPublicInput

PoleTypOpis
addressString!Free-text address or place name
typeLoadzoneTypeEnumZone type filter
standardStringStandard name filter
annexStringAnnex filter
layerIdIntLayer ID
zoomIntMap zoom level (default 5)
mapStringMap tile style
layerOrderIntLayer rendering order
screenshotTypeScreenshotTypeInputImage format and quality

ScreenshotTypeInput

PoleTypOpis
typeScreenshotTypeEnum!PNG or JPEG (default PNG)
qualityInt!JPEG quality 0–100 (default 90)

GetLoadzonePdfInput

PoleTypOpis
addressString!Free-text address or place name
standardStringStandard name filter
annexStringAnnex filter
layerIdIntLayer ID

Typy wyjściowe

CharacteristicsResponseMiaType

PoleTypOpis
codeString!Response status code
messageStringHuman-readable message when code ≠ OK
geoLocationGeofinderDataTypeResolved location data
characteristics[CharacteristicsLoadzoneType2]Per-standard zone results
noLiabilityStringDisclaimer text

CharacteristicsLoadzoneType2

PoleTypOpis
standardString!Standard name
annexString!Annex name
zoneCharacteristicsCharacteristicsLayerType2!Layer result

CharacteristicsLayerType2

PoleTypOpis
idInt!Layer ID
zoneCharacteristicsZoneType2!Matched zone value
characteristics[CharacteristicsVariableType]!Ordered load values

CharacteristicsVariableType

PoleTypOpis
nameString!Parameter name (plain text)
nameHtmlString!Parameter name (HTML)
calculatedValueStringComputed value
unitsHtmlString!Units (HTML)
descriptionString!Parameter description
decimalPlacesInt!Display precision
sequenceInt!Display order

GeofinderDataType

PoleTypOpis
latitudeString!Resolved latitude
longitudeString!Resolved longitude
altitudeString!Elevation
streetStringStreet name and number
zipStringPostal code
cityStringCity / municipality
stateStringState or region
countryStringCountry name
countryCodeStringISO country code

GeoLocationType

PoleTypOpis
latitudeString!Latitude
longitudeString!Longitude
altitudeString!Elevation
displayNameStringFull formatted address
streetStringStreet name and number
zipStringPostal code
cityStringCity / municipality
stateStringState or region
countryStringCountry name
countryCodeStringISO country code

UserDataType

PoleTypOpis
emailString!Account email address
clicksInt!Remaining API calls this billing period

LoadzoneGroupShortType

PoleTypOpis
countryString!Country name
countryCodeString!ISO country code
typeGroups[LoadzoneTypeGroupType]!Zones grouped by type

LoadzoneShortType

PoleTypOpis
standardString!Standard name
annexString!Annex name
loadzoneIdString!Unique load zone identifier
layers[LoadzoneLayerShortType]!Available layers

PdfProgressType

PoleTypOpis
currentStepInt!Steps completed
stepsInt!Total steps
messageString!Status message
pdfResultPdfResultTypePresent on final message only

PdfResultType

PoleTypOpis
pdfString!Base64-encoded PDF
nameString!Suggested filename