# Drone photogrammetry

**URL:** <https://farmos.discourse.group/t/drone-photogrammetry/503>\
**Category:** Using farmOS\
**Created:** [September 29, 2020, 4:28pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503 "2020-09-29T16:28:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafaeltcc](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@rafaeltcc](https://farmos.discourse.group/u/rafaeltcc)\
**Post date:** [September 29, 2020, 4:28pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/1 "2020-09-29T16:28:41Z")

</div>

Hi everyone,

Recently I have tinkered with the creation of ortographic maps and 3d models created using opendronemap.

I see I can add a layer with my own ortophotos, although I have not yet tried it.

Besides this, there are so many other ways in which this could be useful.

I am thinking on a specific use case of mapping in loco erosions and road maintence points with the Field Kit app and latter generate a 3d animation of a flyby over those points. So I could easily create video briefings that I could share with other peoples that would work in this problem with me.

I know much of this is outside the realm of FarmOs, but I would like to hear about the workflows others are using to integrate drones with farmOs…

---

<div class="post-metadata">

**Author:** ![Lars](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@Lars](https://farmos.discourse.group/u/Lars)\
**Post date:** [September 29, 2020, 11:38pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/2 "2020-09-29T23:38:47Z")

</div>

Sounds like you are doing some interesting things with opendronemap.  
I am using a drone to take aerial pictures of the fields every 2-5 months to check on weed patches. I would love to be able to overlay the pictures of the complete field (small ones) and see the development.  
Additionally it would be great to gather information on water and nutrient availability in different field regions.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [September 29, 2020, 11:53pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/3 "2020-09-29T23:53:56Z")

</div>

This is something I’ve always been interested in too @Lars! Seeing aerial imagery taken periodically, with some kind of “timeline slider” to watch it change (tied into [https://github.com/farmOS/farmOS-map/issues/53](https://github.com/farmOS/farmOS-map/issues/53) perhaps?)

It wouldn’t be too complicated, code-wise! farmOS maps are based on OpenLayers, and adding layers to the map is easy. The main thing missing in farmOS is the actual hosting of the data layers. But spin up an instance of [GeoServer](http://geoserver.org/) / [MapServer](https://mapserver.org/) and that should be possible! Someone should try this! 😉

---

<div class="post-metadata">

**Author:** ![paul121](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@paul121](https://farmos.discourse.group/u/paul121)\
**Post date:** [October 6, 2020, 4:31am UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/4 "2020-10-06T04:31:54Z")

</div>

Wanted to quickly chime in here! I’m helping a group integrate drone & satellite imagery from a self-hosted GeoServer into farmOS. We have a form in farmOS that is used to record activity logs (associated with the relevant areas) with info about the drone flight in the log’s data field. This basically means saving a “layer name” that’s used to request the WMS imagery layers from GeoServer.

Then when loading an area page, if there are any of these “imagery activity” logs that happened in the area, we add the imagery layers to the map. It works quite well! I haven’t done much work on the GeoServer side of things, but it seems fairly easy to set up. There is additional work needed for processing the drone imagery (and free Sentinel 2 imagery) before it is added to GeoServer - I’m not familiar with that process either.

> I would love to be able to overlay the pictures of the complete field (small ones) and see the development.

Once you have multiple images added to the map this is quite possible. You can toggle the layer visibility to change which is “on top” and effectively see changes over time. A “timeline slider” would be the next best thing!

This has all worked well for farmOS 1.0 but I’m considering creating a first-class “imagery asset” for farmOS 2.0. This would allow for a more structured data model - logs and/or assets could have dedicated fields for referencing Imagery Assets, and the Imagery Asset could have fields for the values it needs (geoserver URL, authentication token/credentials, layer name, etc.) A nice feature this would provide is “archiving” imagery assets once they don’t need to be displayed in the map.

---

<div class="post-metadata">

**Author:** ![Lars](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@Lars](https://farmos.discourse.group/u/Lars)\
**Post date:** [October 6, 2020, 10:41pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/5 "2020-10-06T22:41:33Z")

</div>

@paul121 thank you very much for your reply. It sounds like exactly what I would like to do. Especially the self hosted GeoServer sounds very interesting. I looked at the link provided by @mstenta (thank you) and wonder how difficult that would be.

For those of you interested in Sentinal 2 images I can recommend [Earth Engine Apps Online](https://earthmap.org/compare.html?geoJson=%7B%22type%22:%22Point%22,%22coordinates%22:%5B0,0%5D%7D&zoom=3). The slider in this case is not that useful for comparisons in fields (the layer option you mentioned would be better)

It would be great to have this added to farmOS 2.0 but would also be useful in the meantime (winter project for me 🙂).

---

<div class="post-metadata">

**Author:** ![BOTLFarm](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/botlfarm/32/74_2.png) [@BOTLFarm](https://farmos.discourse.group/u/BOTLFarm)\
**Post date:** [December 21, 2020, 7:01pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/6 "2020-12-21T19:01:20Z")

</div>

Just to chime in on this. I have been very interesting in getting drone maps into farmOS. I use opendronemaps for my stitching and have webODM send the finished files to [openaerialmap.org](http://openaerialmap.org). I know almost nothing about map servers but was able to copy the Norwegian map layer farmOS module and just changing out a few things including the link to the TMS link form openairealmaps. Worked perfectly! No need to host my own map server this way.

---

<div class="post-metadata">

**Author:** ![paul121](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@paul121](https://farmos.discourse.group/u/paul121)\
**Post date:** [December 21, 2020, 8:22pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/7 "2020-12-21T20:22:39Z")

</div>

Very cool @BOTLFarm!! Glad you were able to figure that out. One thing to note though, a map/imagery server is still required 😉

I recently found about about the [Cloud Optimized Geotiff](https://www.cogeo.org/) (COG) project. It allows a somewhat specialized geotiff file served by a standard file server to behave like a map server! I did a little bit of testing and was able to load a COG file from my farmOS server into a JS map - this is really cool because it means farmOS could be your imagery server, too!

It also allows for some cool features like the COG file being uploaded in the files of a “Drone flight” Activity log. I’m hoping to explore this further as I get the chance… pondering the concept of an “Imagery” asset type to help accommodate some of these features. Perhaps ways to visualize your library of imagery assets, compare over time, etc.

The tricky part is converting the imagery into a COG. But there are a good number of scripts/tools to do this and it is becoming more supported. A cool example is the Sentinel2 COG dataset on AWS: [https://www.element84.com/blog/sentinel-2-cloud-optimized-geotiffs-now-available-on-aws-registry-of-open-data](https://www.element84.com/blog/sentinel-2-cloud-optimized-geotiffs-now-available-on-aws-registry-of-open-data)

---

<div class="post-metadata">

**Author:** ![BOTLFarm](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/botlfarm/32/74_2.png) [@BOTLFarm](https://farmos.discourse.group/u/BOTLFarm)\
**Post date:** [December 22, 2020, 1:32am UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/8 "2020-12-22T01:32:51Z")

</div>

Yes @paul121 it still requires a map server.

I guess what I was getting at is I did not have to set one up myself. I run farmOS on a shared server with limited aces to what I can do on the server. I was unable to find a way to host my own map server. OpenAerialMap was a convenient way to get my map images hosted. The main caveat to using this is the images become openly licensed for anyone to view. Not an issue for me.

The COG sound great with the ability to run them directly in farmOS. Looking forward to playing with this some.

---

<div class="post-metadata">

**Author:** ![Skipper](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Skipper](https://farmos.discourse.group/u/Skipper)\
**Post date:** [December 28, 2020, 4:43pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/9 "2020-12-28T16:43:51Z")

</div>

We use TileServer to host ours, it is php based, so runs off of your standard web server nicely.

---

<div class="post-metadata">

**Author:** ![faufau](https://avatars.discourse-cdn.com/v4/letter/f/51bf81/32.png) [@faufau](https://farmos.discourse.group/u/faufau)\
**Post date:** [May 11, 2023, 4:27am UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/10 "2023-05-11T04:27:11Z")

</div>

Hi, I am interested in your approach, can you share how to do it.

---

<div class="post-metadata">

**Author:** ![BOTLFarm](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/botlfarm/32/74_2.png) [@BOTLFarm](https://farmos.discourse.group/u/BOTLFarm)\
**Post date:** [May 11, 2023, 5:52pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/11 "2023-05-11T17:52:15Z")

</div>

Hey,

> [@faufau](#):
>
> Hi, I am interested in your approach, can you share how to do it.

Not sure which aspect you were interested in. For the photo stitching I use [webODM](https://www.opendronemap.org/webodm/). Once I have a stitched file I upload the map file to OpenAerialMaps. This can be done right form webODM. From there you can copy the TMS url of your map.

In farmOS 7.x I was able to modify the [Norwegian Map Module](https://github.com/farmOS/farm_map_no/blob/7.x-1.x/farmOS.map.behaviors.farm_map_no.js) and directly replace TMS url with the one from the OpenAerialMaps. This worked really well in 7.x but I have not explored a way to do this in the new version of farmOS 2.x.

Hopefully this gets you pointed in the right direction. If anyone knows of a simple way to get these maps in 2.x I would be interested.

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [May 11, 2023, 6:13pm UTC](https://farmos.discourse.group/t/drone-photogrammetry/503/12 "2023-05-11T18:13:36Z")

</div>

> [@BOTLFarm](#):
>
> In farmOS 7.x I was able to modify the [Norwegian Map Module](https://github.com/farmOS/farm_map_no/blob/7.x-1.x/farmOS.map.behaviors.farm_map_no.js) and directly replace TMS url with the one from the OpenAerialMaps. This worked really well in 7.x but I have not explored a way to do this in the new version of farmOS 2.x.
> 
> Hopefully this gets you pointed in the right direction. If anyone knows of a simple way to get these maps in 2.x I would be interested.

The `farm_map_no` module doesn’t have a 2.x version AFAIK, but I’ve updated my [farm\_map\_sjc module](https://github.com/symbioquine/farm_map_sjc) for 2.x already so that might serve as a useful example of how to make a module for 2.x that adds base layers.
