Skip to content

area polygon

robert-valueguard edited this page Mar 18, 2025 · 8 revisions

The code below gives an example of how to use the client to get area information polygon data

import valueguard

vgClient = valueguard.Client()
vgClient.authenticate("<username>", "<password>")

print(vgClient.area_polygon(search_criteria={
"area_ids":'1,2,3'
}))

Area polygons

Returns a polygon, area id and area name in a GeoJson format

Polygon

{
    "area_polygons": {
        "features": [
            {
                "geometry": {
                    "coordinates": [
                        [
                            [
                                15.316,
                                56.9814
                            ],
                            [
                                15.316,
                                56.9811
                            ],
                            [
                                15.316,
                                56.981
                            ],
                            [
                                15.316,
                                56.9807
                            ],
                            [
                                15.3159,
                                56.9803
                            ],
                            [
                                15.3159,
                                56.9802
                            ],
                            [
                                15.316,
                                56.9818
                            ],
                            [
                                15.316,
                                56.9814
                            ]
                        ]
                    ],
                    "crs": {
                        "properties": {
                            "name": "EPSG:4326"
                        },
                        "type": "name"
                    },
                    "type": "Polygon"
                },
                "properties": {
                    "area_id": 1,
                    "area_name": "0760B2010"
                },
                "type": "Feature"
            }
        ],
        "type": "FeatureCollection"
    }
}

Field list

Field name Description Example
area_id ID of area 0180C4830
area_name Name of area 6

Required search criteria fields

Field name Description Example
area_ids List of area IDs {1, 2, 3}
limit Max number of objects returned 10000

Raw request

Get

curl https://api.valueguard.se/v1/area/polygon?access_token={access_token}&area_ids={area_ids}

Clone this wiki locally