Skip to content

Index polygon

robert-valueguard edited this page Oct 30, 2024 · 2 revisions

Get index polygon

The code below gives an example of how to use the client to get index polygon.

import valueguard

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


print(vgClient.index_polygon(search_criteria={
    "id":913011018001046,
}))

Polygon

{
    "area_polygons": {
        "features": [
            {
                "type": "Feature",
                "geometry": {
                    "type": "Polygon",
                    "coordinates": [
                        [
                            [
                                18.037137,
                                59.247748
                            ],
                            [
                                18.036833,
                                59.247819
                            ],
                            [
                                17.993514,
                                59.260877
                            ]
                        ]
                    ],
                    "crs": {
                        "type": "name",
                        "properties": {
                            "name": "EPSG:4326"
                        }
                    }
                },
                "properties": {
                    "area_name": "Stockholm testområde",
                    "area_id": 534286
                }
            }
        ],
        "type": "FeatureCollection"
    }
}

Search criteria fields

Field name Description Example
id Index id 913011018001046

Raw public index request

Get

curl https://api.valueguard.se/v1/index/polygon?id={id}

Clone this wiki locally