Skip to content

iKenndac/lantmateriet-lookup

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Lantmäteriet Lookup

Generate aerial image metadata for submission to Lantmäteriet for public distribution approval.

Who is this for?

People who take aerial photographs or videos in Sweden, perhaps with a drone.

Why does this exist?

Sweden has strong surveillence laws, and as such it's illegal to publicly publish photos or videos taken from the air without approval from the the Swedish mapping, cadastral and land registration authority: Lantmäteriet. This includes publishing them online, including on social networks like Facebook, Twitter, and the like.

More information on Sweden's laws surrounding drones can be found (in Swedish):

Submission to Lantmäteriet for photo and video approval can be made using this form. Multiple images can be submitted from one form submission.

For each image you wish to publish, you need to provide the image's:

  • Street address, including kommun.
  • Fastighetsbeteckning (a kind of property designation).
  • The image's coordinate.

An entry for a single image might look like this:

File Name Street Address Kommun Fastighetsbeteckning Coordinate
DJI_0005.jpg Fågelsta Arbetarbostaden 2 SALEM VÄLLINGE 1:1 59° 13’ 19,65” N, 17° 44’ 41,166” E

You can manually look up a coordinate's street address using Google Maps or similar, but for the fastighetsbeteckning you need to use the Lantmäteriet map to look it up.

As you can imagine, doing this manually can be a very time-consuming task!

What does it do?

This little program automates the above process, taking some images and generating a table of data for submission to Lantmäteriet.

This program will not do the submission for you! It's reasonably common for automated lookups of addresses and the fastighetsbeteckning to return low-accuracy or no data at all, especially if you're flying your drone over water, or otherwise outside of civilisation.

Building

This project uses the Swift Package Manager, and requires Xcode 10 or higher be installed.

  1. Clone the repository to your computer.
  2. cd to the repository and run swift package update to update dependencies.
  3. Run swift build to build the project.
  4. If you want to work on it, you can run swift package generate-xcodeproj to create an Xcode project. As per Swift Package Manager convention, don't check this into the repo!

Using

For a nice HTML table that includes location lookup links to Google Maps and Lantmäteriet to help manually tidying up the data, you can run:

$ lantmateriet-lookup -i *.jpg -html results.html

For text-based output, you can run:

$ lantmateriet-lookup -i *.jpg -tsv results.tsv

Text output won't include Google Maps and Lantmäteriet map URLs by default, but you can include them with -u:

$ lantmateriet-lookup -i *.jpg -u -tsv results.tsv

If you omit both -html and -tsv, text output will be written to stdout, for your piping and redirecting pleasure.

Sample Output

You can see a HTML table generated by this tool here.

About

Tool for assisting with aerial photograph distribution submissions to Lantmäteriet, the Swedish mapping, cadastral and land registration authority.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages