MapProxy: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
There are some map services that are unreliable because they are unreachable sometimes
Some map services are unreliable because they are unreachable, sometimes
for days. I think I can solve this problem using [https://mapproxy.org MapProxy] though.
for days. I can address this problem using [https://mapproxy.org MapProxy] though.


There is a cache engine built into [[GeoServer]], I write about it here: [[GeoWebCache]],  
There is a cache engine built into [[GeoServer]], I write about it here: [[GeoWebCache]],  
I have tried to make it work but keep coming back to MapProxy because it's easier to set up.  
I have tried to make it work but keep coming back to MapProxy because it's easier to set up.  


I started to install mapproxy directly on the host then realized yet again I'd be making a bunch of changes to the host
== Local usage notes ==
just for this one app.


I am developing a relatively portable Docker project of my own now,
I'm using MapProxy in Docker.
I want it to run on Windows but right now it's targeted at Linux because it's easier.
I started to install mapproxy directly on the host then realized yet again I'd be
making a bunch of changes to the host just for this one app.


I found a Docker containing miniconda and am using that right now.
My github repository is https://github.com/wildsong/docker-mapproxy. The project contains more detailed notes.
 
=== Storage ===
 
I tried CouchDB as the data store for a few months until one day it stopped working. I switched back to files.
MapProxy supports other back ends but it's hard to beat files for simplicity.
 
=== Compose ===
 
I started off using Docker Compose to start both MapProxy and CouchDB and to link the containers together.
Putting it behind an ArcGIS Enterprise portal requires that it respond on port 443, so at work I do that with
a reverse proxy. At home I run it without a proxy, just using it for testing.


My github repository is https://github.com/wildsong/docker-mapproxy. The project contains more detailed notes.
=== Oregon Explorer service glitch ===


I use Conda as the package management tool because it can install things on Windows that I need,
I figured out trial and error that two of the OE services won't deliver usable data on WMS,  
notably the libgeos and libproj binaries.
only on WMTS. Something to be aware of!
I will probably drop them a line some day and ask why it's broken.  


== Storage ==
== Wish list ==


I am trying to use CouchDB as the data store, because it makes sense to use NoSQL for this. MapProxy supports
How much of this can I do with Geoserver right now today?
other back ends, including files.


I have an idea that I can run MapProxy in Windows and CouchDB on some other machine to split up the workload.
API


== Compose ==
Keep config in SQLite instead of flat files?


I started off using Docker Compose to start both MapProxy and CouchDB and to link the containers together.
Read only
It's all working smoothly now so I will move on to Docker Swarm soon.


Currently it works on two different Linux servers, cc-testmaps and bellman.
# usage stats
# storage usage
# cache status
# seed status
# backend info
# start / stop / restart a service
# add a service
# delete a service


It's not behind a proxy right now, I just access it on port 8080 on the host network.
Admin


== Oregon Explorer service glitch ==
# clear cache
# start stop seeding
# get | set thumbnail
# get | set description


I figured out trial and error that two of the OE services won't deliver usable data on WMS, only on WMTS. Something to be aware of!
I will probably drop them a line some day and ask why it's broken.


== Multiple services ==
=== Multiple services ===


I want several groups of services, for example, a service called "or-ex"
I want to be able to group services, for example, a service called "or-ex"


  Oregon Explorer
  Oregon Explorer

Latest revision as of 17:39, 26 September 2021

Some map services are unreliable because they are unreachable, sometimes for days. I can address this problem using MapProxy though.

There is a cache engine built into GeoServer, I write about it here: GeoWebCache, I have tried to make it work but keep coming back to MapProxy because it's easier to set up.

Local usage notes

I'm using MapProxy in Docker. I started to install mapproxy directly on the host then realized yet again I'd be making a bunch of changes to the host just for this one app.

My github repository is https://github.com/wildsong/docker-mapproxy. The project contains more detailed notes.

Storage

I tried CouchDB as the data store for a few months until one day it stopped working. I switched back to files. MapProxy supports other back ends but it's hard to beat files for simplicity.

Compose

I started off using Docker Compose to start both MapProxy and CouchDB and to link the containers together. Putting it behind an ArcGIS Enterprise portal requires that it respond on port 443, so at work I do that with a reverse proxy. At home I run it without a proxy, just using it for testing.

Oregon Explorer service glitch

I figured out trial and error that two of the OE services won't deliver usable data on WMS, only on WMTS. Something to be aware of! I will probably drop them a line some day and ask why it's broken.

Wish list

How much of this can I do with Geoserver right now today?

API

Keep config in SQLite instead of flat files?

Read only

  1. usage stats
  2. storage usage
  3. cache status
  4. seed status
  5. backend info
  6. start / stop / restart a service
  7. add a service
  8. delete a service

Admin

  1. clear cache
  2. start stop seeding
  3. get | set thumbnail
  4. get | set description


Multiple services

I want to be able to group services, for example, a service called "or-ex"

Oregon Explorer
   OSIP2018
   NAIP2016
   etc

and one called "dogami"

 DOGAMI
   hillshade
   BE hillshade

so that I can group things in maps. I think the layout is supposed to be like this:

config/
  mapproxy.yaml -- default example not used in this case
  globals.yaml -- included from each file in services
  services/
    or-ex.yaml -- creates the service http://hostname/or-ex
    dogami.yaml -- creates the service http://hostname/dogami