Skip to content

Instantly share code, notes, and snippets.

@oscar9
Last active April 3, 2021 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oscar9/ee818954fe76af743b4acc9cce72eac8 to your computer and use it in GitHub Desktop.
Save oscar9/ee818954fe76af743b4acc9cce72eac8 to your computer and use it in GitHub Desktop.
# encoding: utf-8
import gvsig
from org.gvsig.fmap.mapcontext import MapContextLocator
def main(*args):
raster = gvsig.currentView().getLayer("Resultado")
manager = MapContextLocator.getMapContextManager()
name = "mynewraster"
parameters = raster.getDataStore()
newraster = manager.createLayer(name, parameters)
gvsig.currentView().addLayer(newraster)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment