Appearance
Data Source: Traffic Accidents
Slovenian traffic accident data is fetched from the AVP WFS API (nesrece.avp-rs.si). A historical importer for the policija.si annual ZIP files used to live alongside it but has been retired — AVP supplies the same fields plus drug-test data, unique participant IDs, hot-spot flags, and incremental fetching by date range.
Source: nesrece.avp-rs.si (AVP)
URL: http://nesrece.avp-rs.si/geo/wfsFormat: WFS (GeoServer) — supports GeoJSON, CSV, Excel, KML, Shapefile Access: Standard OGC WFS protocol with CQL filter support Layer: BSM:view_bpn_nTotal records: ~700k (704,781 as of April 2026) CRS: EPSG:3912 (Slovenian national grid)
How it works
- Query WFS endpoint with filters (date range, region, type, etc.)
- Paginate with
startIndex+maxfeatures - Response is GeoJSON with Point geometry per accident
- For each accident, call
udel.php?key={key}to get the participant HTML table
The data-fetching worker (AvpAccidentsFetcher) fans out one job per day so a year-long backfill is bounded into ~365 short jobs instead of one giant one. See data-fetching/src/processors/sources/avp-accidents.fetcher.ts.
Request example
GET http://nesrece.avp-rs.si/geo/wfs?
service=wfs&
version=1.1.0&
request=getfeature&
typename=BSM:view_bpn_n&
outputformat=application/json&
maxfeatures=1000&
startIndex=0&
cql_filter=datum >= '2025-01-01' AND datum <= '2025-12-31'Supported CQL filters
| Filter | Example |
|---|---|
| Date range | datum >= '2025-01-01' AND datum <= '2025-12-31' |
| Region | regijao = 'OSREDNJESLOVENSKA' |
| Municipality | obcinao = 'LJUBLJANA' |
| Classification | klas = 'S' (S=death, H=serious, L=light, B=none) |
| Cause | vzrok = 'HI' (HI=speed, PD=priority, etc.) |
| Type | tip = 'ČT' (ČT=head-on, BT=side, NT=rear-end, etc.) |
| Weather | vreme = 'D' (D=rain, J=clear, M=fog, S=snow) |
| Road type | lovc = '0' (0=motorway, 1=main I, H=expressway, etc.) |
| Bbox | BBOX(the_geom, 400000, 50000, 600000, 200000) |
| Participants | st_oseb > 2 |
Accident fields
| Field | Description | Example |
|---|---|---|
key | Accident ID | 001013229 |
datum | Date (ISO) | 2022-12-29Z |
mesec | Month | 12 |
dan | Day of week (0=Sun) | 5 |
dannoc | Day/night | dan |
ura_int1 | Hour interval | 23-24 |
regijao | Statistical region | PODRAVSKA |
obcinao | Municipality | MARIBOR |
klas | Classification code | S / H / L / P / B / O |
priority | Priority (severity rank) | 4 |
tip | Accident type code | ČT / BT / NT / TO / ... |
vzrok | Cause code | HI / PD / SV / PR / ... |
vreme | Weather code | J / D / M / S / ... |
povrsje | Road surface code | SU / MO / SN / ... |
vozisce | Road pavement code | AH / AN / AZ / MA |
promet | Traffic code | N / G / R / Z |
lovc | Road class code | 0–5, H, L, N, T, V |
nas | Settlement (D/N) | D |
kraj | Location type code | C / R / Z / P / ... |
cesta | Road number | 102 |
odsek | Section number | 1006 |
stac | Chainage | 000005900 |
pcestao | Road name | ROBIČ-IDRIJA-LOGATEC |
podseko | Section name | IDRSKO-PERŠETI |
osebe | Participants (compressed) | {D;OA;[25-34];0;0;P;0,N;PT;...} |
st_oseb | Number of participants | 3 |
ishs | Is "hot spot" | true / false |
the_geom | Point (EPSG:3912) | [461234, 100567] |
Participant detail endpoint
No WFS/API exists for participants. The GeoServer only exposes
BSM:view_bpn_n(accidents). The REST API is locked (401). The only way to get detailed participant records is this PHP endpoint. No JSON variant —?format=jsonstill returns HTML.
URL: http://nesrece.avp-rs.si/udel.php?key={accident_id}Format: HTML table (one row per participant, needs parsing) Access: GET request with the accident key field
| Field | Description | Example |
|---|---|---|
idpn | Accident ID | 001111922 |
ID osebe | Participant ID (unique) | 009265399 |
datum | Date (DD.MM.YYYY) | 21.04.2025 |
udeleženec | Participant type | voznik osebnega avtomobila |
poškodba | Injury type | huda telesna poškodba |
povzročitelj | Causer (da/ne) | ne |
spol | Sex | ženska / moški |
starost | Exact age | 59 |
zaščita | Safety equipment (da/ne) | da |
staž | Driving experience (YYL MMM) | 01L03M = 1 year 3 months |
državljanstvo | Citizenship | SLOVENIJA |
alkotest odrejen | Breathalyzer ordered (D/N) | D |
alkotest | Breathalyzer result | NEGATIVEN / POZITIVEN |
alkotest vrednost | Breathalyzer value | 0.00 |
etilometer odrejen | Ethylometer ordered (D/N) | N |
etilometer | Ethylometer result | (empty if not ordered) |
etilometer vrednost | Ethylometer value | 0.00 |
str. pr. odrejen | Medical exam ordered (D/N) | D |
str. pr. | Medical exam result | POZITIVEN |
str. pr. vrednost | Medical exam value | 01.76 |
str. pr. mamila odrejen | Drug test ordered (D/N) | D |
str. pr. mamila | Drug test result | (empty) |
str. pr. mamila vrednost | Drug test value | N |
mamila hitri test | Rapid drug test | N |
Notes & caveats
- HTTP only (no TLS listener on the host).
- Participant detail requires one HTTP call per accident; the per-day fetch model keeps the working set bounded (~50–150 accidents/day → ~50–150 follow-up calls).
- Coordinates are in EPSG:3912 — projected to WGS84 by
data-processing/src/common/coordinate-projector.ts. - No documented rate limits — fetcher uses sequential per-day jobs to be polite.