okestonia / opendata-issue-tracker

Community effort to open up more and more data in Estonia
http://opendata.ee
48 stars 5 forks source link

Forest management data #139

Open timotoots opened 6 years ago

timotoots commented 6 years ago

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

andreskytt commented 6 years ago

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

keeganmcbride commented 3 years ago

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.

o130 commented 3 years ago

@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.

keeganmcbride commented 3 years ago

@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"

tkardi commented 3 years ago

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.

keeganmcbride commented 3 years ago

@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

tkardi commented 3 years ago

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.

keeganmcbride commented 3 years ago

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.

tkardi commented 3 years ago

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.

keeganmcbride commented 3 years ago

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.

tiitmats commented 3 years ago

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