Map projection quality

Hi there folks!

I am new to FarmOS, what a treat this software is. I am very eggar to get started mapping my 5 acre farm but I’m very discouraged by the image quality provided by MapBox, OpenStreetMap. Recently a friend of the farm was able to get aerial drone imagery uploaded to a public domain mapsmadeeasy.com.

I assume that many farms have continually changing landscapes and infrastructure updates.
I would be so grateful if anyone in this community was able to help me update the map of my farm so that I can more accurately start mapping!

Thank you and take care,
Emma
ALM Organic Farms

4 Likes

Hi, Emma, and welcome to the community!

I know others have discussed the possibility of getting custom imagery imported into farmOS as map tiles, but usually the challenge is in hosting that imagery. Sounds like you have a solution for that though.

I’m not familiar with that service’s API, but the next step, I presume, would be to write some sort of integration with farmOS to add those map tiles via farmOS-map.

2 Likes

Hi @almorganic_emma!

Yea, the quality of satellite imagery available via Google and MapBox varies widely from place to place - so this is a common challenge. As @jgaehring said, the main hurdle is hosting the tiles in a way that farmOS-map can load them into the map.

It sounds like Maps Made Easy would be a great service to integrate with!

We actually had a very similar integration module in farmOS 1.x that allowed you to pull in a layer that was hosting in MapKnitter (a very similar service). I would love to see a Maps Made Easy farmOS integration module! It might not be too hard to build.

Maybe someone in the community can get that ball rolling in an add-on module for farmOS 2.x! I’d be happy to share examples and provide guidance.

2 Likes

Hi Mike @mstenta ,

I have a similar need as @almorganic_emma:

  • to generate detailed FarmOS maps made over recent, high-resolution, local imagery
    (in particular, free orthorectified images offered local government. For example, in New Zealand there is 0.3m resolution imagery available for projections NZDT2000, EPSG:2193, EPSG:2124…)

→ “MapKnitter is offline due to lack of funds”

→ I would like to learn more about this. Could we see if I am up to it? Thank you Mike

1 Like

@Guillermo If you want to undertake a farmOS + Maps Made Easy integration module, feel free!

Question: Do you have imagery already that you produced? Is it already hosted on a GIS server of some kind? If so, then maybe a simple custom module that just pulls in the specific layers you want would be easier than a general purpose integration module (which would have to consider other users needs).

I am exploring QGIS for editing the old farm map (made over low resolution imagery)

New imagery is supplied by LINZ (New Zealand government body) (This time, resolution is 0.3m).
They offer a LINZ-QGIS plugin, along with API keys and URL links for QGIS integration.

QGIS can access this imagery via two ways:

  1. Connecting: QGIS connects to LINZ and uses the full chosen mosaic (67Gb in this case), or
  2. Downloading:
    2.1. the full mosaic (67Gb), or
    2.2. a cropped file (5Gb) containing the area of the farm (the LINZ website provides a cropping tool) (this 5GB file covers a 50,000 hectares around the farm, at 0.3m resolution)

That would be great!
(also as a test of if I am/ain’t/need-to-learn-more-for ready to collaborate with any coding)

I think this is what you want @Guillermo:

And their Getting Started guide might also help, if you haven’t already seen it:

You don’t need QGIS or ArcGIS at all. It sounds like it’s possible to load the XYZ image layers directly into the map in farmOS. You will need to create an API key through https://www.linz.govt.nz and use that when accessing the layers.

The Mapbox module that is included with farmOS works exactly the same way. You can probably just copy and paste that module, and replace everything Mapbox specific…

For adding XYZ tile server map layers, you can also use the farmOS Custom Map Layers module. After installing it, you will be able to configure custom map layers in the farmOS dashboard.

For example, to add Aerial Imagery Basemap from https://basemaps.linz.govt.nz with this module you can:

  • go to https://basemaps.linz.govt.nz and copy XYZ layer url with the 90 days api key
  • on your farmOS instance, go to Settings > Map > Custom layers (/farm/settings/map/custom-layers)
  • click ‘Add custom map layer’
  • fill layer details in the form
  • save changes

The new map layer should be now available on the map.

8 Likes

Wow @wotnak that’s great! We talked about making a general purpose module like that in some earlier discussions! This could be very useful, and reduces the need to create lots of modules for each specific layer source.

2 Likes

Hi @wotnak That’s amazing ! Thank you very much for putting all that together !

Questions for both of you:

  1. I am on a Farmier trial hosting subscription, so is that Mike @mstenta has to enable the module?

  2. My future intention is to eventually cache a cropped area containing the farm from a high resolution basemap to be able to edit the map offline and in situ. Do you think a dev like this could be done?
    __
    (There are many places in NZ where hills prevent cell reception. So many at times one happens to be in one of those places, let’s say shifting cattle through a gate, while at the same time verifying the inaccuracy of the map and wishing one could edit details on the spot.)

2 Likes

Thank you @wotnak! This is amazing.

A possible bug, or maybe a larger issue in farmOS with overlay orders. If I set the maps as overlays and not base layers on the dashboard the map overlays end up at the bottom of the list. This mean the land boundaries etc. are drawn on top of them. However in asset view these overlays are moved to the top of the list and drawn last overtop of everything else.

3 Likes

Released v1.0.1 https://www.drupal.org/project/farm_map_custom_layers/releases/1.0.1 with a fix that should ensure that custom layers are always loaded after the default ones.

5 Likes

@Guillermo Farmier offers a curated set of modules that can be enabled, so this one would need to be added before you can use it. I have a review process to make sure that modules I host work as expected and don’t pose any security/privacy issues. This one is a really nice candidate! I haven’t looked at the code yet, but it seems like it would be a pretty simple/straightforward module (we even discussed building something like this in farmOS core in the past). I just need to set aside some time to review it. :slight_smile:

4 Likes

Thank you for making this! Getting farmOS to use my existing drone imagery (available through a WMS service) was a big stumbling block in getting started. farm_custom_map_layers made it easy to find my way through the necessary plumbing.

I just sent a merge request to add support for WMS layers to your module, so that they’re easy to use for others as well. It’s my first time developing anything for/with Drupal, please excuse any workflow errors :slight_smile:

5 Likes

Released new version of the Custom Map Layers module v1.1.0 with some new features including WMS layer support by @ppetru:

  • #3392286 by elfakhar, dfoth: Increase url field maxlength
  • #3386626 by ppetru, wotnak: WMS layer support
  • allow for configuring custom layers groups
  • add option to define layer opacity
  • add option to override layer options by providing custom json object that will be merged on top of the options prepared automatically

In the coming weeks, I also plan to work on:

  • implementing support for other basic layer source types,
    • this will also include allowing for creating custom layer source types,
      • so for example one could be created for displaying assets that would allow selecting which assets should be displayed and would display their geometries on the map, similar to how the core farmos map layers work,
  • adding option to manage layer order and layer groups order,
  • allowing for providing configurable map layers in other modules that would have some configuration like source locked but other things like name, group, order could be customized by the user.
5 Likes