Skip to Content.

mget-help - Re: [mget-help] Finding fronts in SST images

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


Re: [mget-help] Finding fronts in SST images


Chronological Thread 
  • From: Rachael Orben <>
  • To: Jason Roberts <>
  • Cc: "" <>,
  • Subject: Re: [mget-help] Finding fronts in SST images
  • Date: Fri, 1 Apr 2022 10:21:37 -0300
  • Authentication-results: mail-gw.oit.duke.edu; spf=pass ; dmarc=none

Hi Jason & Marco,

Thank you both for your suggestions. Unfortunately I don't work in ArcGIS and that has limited my ability to use the C-C tool. There is a surprising lack of an implementation that is openly available in R or Matlab. 

It would be great to get the experimental Matlab implementation of the C-C that Alistair Hobday wrote. That might be the best bet for me as I don't have much experience coding in Python. Though, if I can figure out what the input format is for the eStation codes then adapting those to run through R might be achievable for my skill level!

Thanks,
Rachael

[This email originated from outside of OSU. Use caution with links and attachments.]

Hi Rachael,

 

Thanks for your interest in MGET. It is definitely possible to run the C-C tool programmatically. Assuming you have ArcGIS, the simplest way to do so is to create a geoprocessing model and then export it to a Python script. I forget exactly how to do this export in ArcGIS. In any case, it will show how to invoke the tool from ArcGIS’s Python extension module (arcpy or arcgisscripting).

 

A more advanced method is to call into MGET’s Python modules directly. We have some partial documentation on this, but our funding for developing it ran out quite some time ago and we were never able to take MGET to the point of having a Python API we could fully support. So the documentation is fairly spotty. You can see what is available for the C-C tool:

 

  1. Click Windows Start button and type GeoEco
  2. The best match should be something called GeoEco Python Reference. Open that.
  3. Your web browser should come up with the top level of the documentation. Click on GeoEco Module Index.
  4. Scroll down to the module GeoEco.OceanographicAnalysis.Fronts and click it.
  5. Click on the class CayulaCornillonEdgeDetection.
  6. The first function, DetectEdgesInArcGISRaster, will execute the algorithm on a single raster. This function basically corresponds to the ArcGIS tool that processes a single raster.

 

If you are pretty skilled in Python you can probably take it from here. From a Python command line, the most simple example would be:

 

>>> from GeoEco.Logging import Logger

>>> Logger.Initialize()

>>>

>>> from GeoEco.OceanographicAnalysis.Fronts import CayulaCornillonEdgeDetection

>>> CayulaCornillonEdgeDetection.DetectEdgesInArcGISRaster(r'C:\Temp\SomeSSTRaster.img', 3.0, r'C:\Temp\Fronts.img')

 

In my experience, the C-C tool is pretty complicated and often requires some tweaking of the parameters to get good results. I suggest you prototype everything from ArcGIS and make sure you’re getting the results there that you like, and THEN undertake the job of automating it from code. There’s no point in doing the latter only to find out that the tool won’t give good results.

 

Anyway, once you have it working in Python, you can probably use one of the Python interoperability packages from R if you want to call Python from R. I’m not sure about Matlab. A long time ago, I was communicating with Alistair Hobday, who shared an experimental Matlab implementation of C-C that he wrote. I could probably dig that up for you, if you preferred to work purely in Matlab. But I don’t recall anything about that code and could not help you get it working.

 

Best,

Jason

 

 

Hi,

 

I am interested in using the Cayula-Cornillon Fronts tool from MGET programmatically via R or Matlab (or even python). Do you know if anyone has been able to do so? 

 

Thanks for your help,

Rachael

 

--

~~~~~~~~~~~~~~~~

Rachael A. Orben PhD (she/her)

Assistant Professor (Sr. Research) | Department of Fisheries, Wildlife, & Conservation Sciences | Oregon State University | Hatfield Marine Science Center | Newport, Oregon 97365 



  • Re: [mget-help] Finding fronts in SST images, Rachael Orben, 04/01/2022

Archive powered by MHonArc 2.6.19.

Top of Page