metno / MetAlert-Search

Polygon search and indexing package for Annotated Atlas
Apache License 2.0
1 stars 0 forks source link

Dev: Added script to download kartverkts data #10

Closed fzeiser closed 3 years ago

fzeiser commented 3 years ago

Summary: Added script to download Kartverkt's data.

Script will download the data from kartverkt's API. Currently it will just dump the data.

TBD:

Related Issue: https://github.com/metno/MetAlert-Search/issues/7

Reviewer checklist:

fzeiser commented 3 years ago

Shall we have tests for the script, too? I guess it would make sense, but the most important is that the scripts work against real API calls -- which may have to be fixed all the time, as these are external APIs

fzeiser commented 3 years ago

Working on a script to transform TED to geoJSON. It seems to work in principle, but I think that I'm doing something wrong in the details here. Do you have a suggestion on this @helenk? Note: I basically just modified/adapted ted2shape from autotext.

If one looks at the border to Sweden, I would have thought that the polygon should be aligned with the border. I made sure to convert the basemap for plotting to WGS84. But before I spend a lot of time chasing a ghost, I wanted to make sure that the TED polygons actually are "accurate".

The good test would be if you could specify the lat-lon coordinates of one / several polygons such that I could compare against them directly. I suggest e.g. ted-id = 0702, as it overlaps (or not) with the Norwegian - Swedish border. Figure_1

fzeiser commented 3 years ago

@vkbo: I received a response from Kartverket on my question of how I may get the modification date (and potentially, how I may receive historical data). Unfortunately, it is not possible. So we have to consider whether we want to download the dataset manually instead -- or if we add the validity by hand. The historical data needs to be downloaded by hand anyhow.

Update: Please respond in #12.

API'et støtter ikke det du etterspør.

Da må du gå til geonorge.no og laste ned datasettet, enten som WMS eller datasett. https://kartkatalog.geonorge.no/metadata/administrative-enheter-historiske-versjoner/9bc064e3-6c34-4c3a-8421-00290052e9c0

fzeiser commented 3 years ago

Working on a script to transform TED to geoJSON. It seems to work in principle, but I think that I'm doing something wrong in the details here. Do you have a suggestion on this @helenk? Note: I basically just modified/adapted ted2shape from autotext.

Received a response from Helen. The map look fine for her. The coordinates from TED are generated trough mouse clicking on a map. So a small deviation from geographical features is to be expected. I also received the coordinates in a test CAP file, however I realized that this just used autotext as a base (just as I did)...

fzeiser commented 3 years ago

Update: Please respond in #12, this issue is closed due to a technical problem.