get parcel number out of coordinates

58 views
Skip to first unread message

Hassler Energia

unread,
Aug 5, 2024, 4:28:46 AM8/5/24
to GeoAdminCh API
Hi,
ist there a possibility to get the parcel number out of a certian coordinate? Can you give me an example?

Pascal Barth

unread,
Aug 5, 2024, 5:33:22 AM8/5/24
to geoadm...@googlegroups.com
Hi,

Yes that should be a possibility. You can mimic what map.geo.admin.ch sends when we click on the map at a certain coordinates

Some tips to create all the params :
  • imageDisplay: give it a 100px x 100px / 96dpi, that should work in all cases
  • mapExtent : use your coordinates and create a square with them (by removing for instance 100m on the two first and adding 100m on the second values. In the case of the request above, that would be 2600982,1197448 => 2600882,1197348, 2601082,1197548
There you should receive something like 
{
    "results": [
        {
            "type": "Feature",
            "featureId": 1930613339,
            "bbox": [
                2600899.0,
                1197354.7,
                2601043.6,
                1197509.8
            ],
            "layerBodId": "ch.kantone.cadastralwebmap-farbe",
            "layerName": "CadastralWebMap",
            "id": 1930613339,
            "geometry": {...}
            "properties": {
                "ak": "BE",
                "number": "212",
                "identnd": "BE0200000051",
                "egris_egrid": "CH669746359158",
                "realestate_type": null,
                "geoportal_url": "www.be.ch/geoviewer",
                "label": "BE"
            }
        }
    ]
}

It should contain what you are looking for in the properties.

Best regards,
Pascal


On Mon, 5 Aug 2024 at 10:28, Hassler Energia <hassler...@gmail.com> wrote:
Hi,
ist there a possibility to get the parcel number out of a certian coordinate? Can you give me an example?

--
You received this message because you are subscribed to the Google Groups "GeoAdminCh API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geoadmin-api/69b5aa44-f333-4397-a0c2-8da8737ade19n%40googlegroups.com.

Hassler Energia

unread,
Aug 13, 2024, 3:52:37 AM8/13/24
to GeoAdminCh API
Hi, thanks a lot!
Do I really need to define a square or surface, can I not just set a point?
I use for instance WGS84 format, I would prefer a solution without a polygon.
Reply all
Reply to author
Forward
0 new messages