GSoC Project: Access to geoprocessing tools with gvSIG 2.x Scripting Framework
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

#GSoC Project 2014: ##Access to geoprocessing tools with gvSIG 2.x Scripting Framework Working for gvSIG and OSGeo Foundation

BETA Version Developing:

Valid parameters of the algorithms for use:

  • Vector Layer
  • Raster Layer
  • Table
  • String, boolean and number types
  • Selection
  • Multi parameters

###gvpy: USER GUIDE in English (Not updated)

All the options needed for launch geoprocess from the Scripting Framework

###gvpy: GUÍA DE USO en Español (Updated)

Todas las opciones disponibles para lanzar geoprocesos desde el Módulo de Scripting

See one good example using gvpy! Go to the the folder /example/ inside this repository

##Install ###Developing for gvSIG 2.x

Do you want to know more about what am i doing? Visit my project page: [gvpy project] Or read all my weekly reports in my blog: [weekly reports]

How install gvpy?

  1. You just need gvSIG 2.x
  2. Download src/, you don't need more.
  3. Move to C:\Users[name]\gvSIG\Plugins\\lib
  4. Open gvSIG 2.1 Desktop, and go to Scripting Composer or Jython Console
  5. Write before your script: import gvpy

##Test Now try to use it:

  1. You can download: src/
  2. Create a new View in a new Project
  3. Open gvSIG 2 - Tools - Scripting Composer
  4. Copy text inside & Paste inside a new script, execute!
  5. Commets in every line of code inside, this will help you to understand how it works

Result of

###Src folder:

###gvpy_library + gvpy_algortihms = gvpy That means, access to shortcuts for coding inside gvsig, and access to geoprocess algorithms


Developing access to SEXTANTE and gvSIG-geoprocess. This library will allow you to launch one geoprocess with your jython script.

Ex: Access to SEXTANTE
    r = gvpy.runalg("perturbatepointslayer", LAYER = currentLayer(),MEAN = 5, STDDEV = 5 )
    r = gvpy.runalg("generaterandomnormal", EXTENT = [0,0,0,500,500,0], CELLSIZE=10, MEAN =0.5, STDDEV = 0.5)
    v = gvpy.runalg("randomvector", 20, 1, EXTENT=gvsig.currentView(), PATH = "C://gvsig//random_vector.shp")


(I will develop this part in the next weeks) For now, this library will be to develop easy access to the scripting functions. With less code will be more easy, and more powerful.

#####Ex: Shortcuts for gvSIG Scripting

    #New shape
    layer3 = newLayer(layer,"C:/gvsig/polygon_shape", 3)
    #Add new features
    addFeature(layer1, "point", "04",[0,10])
    addFeature(layer2, "line", "01", [[50,80],[150,50],[100,10],[0,10],[50,80]])
    #New Line
    addFeature(layer3, "polygon", "01", [[50,80],[150,50],[100,10],[0,10],[50,80]])
    #New polygon  
    #Modify all values in one column
    modifyFeatures(layer1, "field1", "Points_gsoc")
    modifyFeatures(layer2, "field1", "Lines_gsoc")
    #Modify schema


UPDATE: Now is inside gvpy! Just execute gvpy.model2script(pathModel, pathNewScript)

Script for gvSIG 2 that allows export from SEXTANTE.model to Python Script with one click.

Export SEXTANTE.model to Script

#Info You can find more info about what is gvpy here:

And my weekly reports: