opendata-issue-tracker icon indicating copy to clipboard operation
opendata-issue-tracker copied to clipboard

Forest management data

Open timotoots opened this issue 6 years ago • 11 comments

There is a public map of forest areas and forestry management announcements (metsaeraldis, metsateatis) at http://register.metsad.ee/

Is this data accessible by other means?

There is some discussion here: https://github.com/e-gov/kem-gsavalik/issues/24

timotoots avatar Oct 07 '18 22:10 timotoots

Information from KeMIT this morning is that "they do not have an API service" despite exposing the API like so https://register.metsad.ee/api/rest/eraldis/detail/6933965. Further contact can be directed to:

""

Was contacted by the people menitoned in the quote above who asked me to remove the data as out of date

andreskytt avatar Oct 08 '18 14:10 andreskytt

Is there any updates on this @otuxe? One option is to just use the API to scrape the entire thing, but I would rather not do that.

keeganmcbride avatar Mar 17 '21 09:03 keeganmcbride

@keeganmcbride Let's see what they answer to your e-mail. Otherwise, there is no update that I'm familiar with. I'll raise it myself as-well and let you know if there is anything to update on.

o130 avatar Mar 17 '21 10:03 o130

@otuxe Thanks!

Just for transparency purposes I will put the referred to email below.

"Tere!

Ma viin läbi üht uurimust Eesti metsade kohta ning kas palun oleks võimalik saada ligipääs metsaeraldiste andmetele (mis on avalikud siin https://register.metsad.ee ) CSV, JSON või XLSX failivormingus? Näen, er API on kättesaadav siin https://register.metsad.ee/api/rest/eraldis/detail/7915495, aga tahtsin küsida Teilt andmeid, enne kui ma hakkan neid ise kokku koondama. Märkasin, et sama probleem on kestnud üle kahe aasta (https://github.com/okestonia/opendata-issue-tracker/issues/139 ). Kui Te ei saa neid andmeid jagada, siis palun andke teada, mis juriidilistel alustel Te neid jagada ei saa.

Kõike kena,

Keegan McBride"

keeganmcbride avatar Mar 17 '21 11:03 keeganmcbride

The WFS service at https://gsavalik.envir.ee/geoserver/metsaregister/ows?service=WFS&version=2.0.0&request=GetCapabilities should have (at least some of) the data MR serves through the public web map.

tkardi avatar Mar 17 '21 11:03 tkardi

@tkardi indeed seems to be there:

<FeatureType xmlns:metsaregister="https://mets-ave.envir.ee">
<Name>metsaregister:eraldis</Name>
<Title>Metsaregistri eraldised</Title>
<Abstract>Metsaregistri kehtiva staatusega eraldised. Eraldise omandivorm on määratud klassifikaatoriga omandivorm_kood veerus (vastavad väärtused metsaregister:kl_omandivorm). Eraldise avaldatud puistunäitajad saab pärida metsaregister:eraldis_element tabelist kasutades seost eraldis.id = eraldis_element.eraldis_id. Andmed @ CC BY 4.0: Metsaregister</Abstract>
<DefaultCRS>urn:ogc:def:crs:EPSG::3301</DefaultCRS>
<OtherCRS>urn:ogc:def:crs:EPSG::4326</OtherCRS>
<ows:WGS84BoundingBox>
...
</ows:WGS84BoundingBox>
</FeatureType>

Now to brush up on using WFS services :D

keeganmcbride avatar Mar 17 '21 11:03 keeganmcbride

Now to brush up on using WFS services :D

:) if you don't have a desktop mapping thingy like QGIS for example the easiest would be to use ogr2ogr and translate wfs service / layer contents to your local db or similar.

This concludes today's advice on something that was not asked for.

tkardi avatar Mar 17 '21 11:03 tkardi

https://gsavalik.envir.ee/geoserver/metsaregister/ows?service=WFS&version=2.0.0&request=GetFeature&typenames=metsaregister:eraldis&outputFormat=JSON seems to do the trick.

keeganmcbride avatar Mar 17 '21 11:03 keeganmcbride

But mind the number of features that are returned in a single query: the wfs server might have a top limit set and requesting a gazillion features in one go might put heavy burden on the machine.

With WFS 2.0.0 it's possible to page through the whole layer getting n-number of features in one query like so: https://gsavalik.envir.ee/geoserver/metsaregister/ows?service=WFS&version=2.0.0&request=GetFeature&typenames=metsaregister:eraldis&outputFormat=application/json&count=10&startindex=10

more queries but smaller response sizes per query.

tkardi avatar Mar 17 '21 11:03 tkardi

Yeah, will do that now. Just need to figure out if / where the korraldaja element is. It is returned in the API version, but doesn't seem to be available in the WFS service.

keeganmcbride avatar Mar 17 '21 12:03 keeganmcbride

This question is the same as: https://github.com/okestonia/opendata-issue-tracker/issues/175 Offical forest management data is avaliable in WFS-service. metsaregister API is designed for use by Metsaportaal and is not intended for public use

tiitmats avatar Mar 30 '21 06:03 tiitmats