Access to geoprocesses with Scripting Framework for gvSIG 2.x

You will be allow to execute SEXTANTE algorithms and gvsig-geoprocesses inside your jython scripts.
Also i will be developing ‘gvpy’ library that will extremly simplify all your code.

Follow me on: masquesig.com or @masquesig

Learn more – Weekly reports
5387c25f21cd18fb7828326f_gsocweek1.jpg

What is gvSIG 2 and his new Scripting Framework?

You will learn how to develop your own tools!
5387cb76197afdfe785e2f2c_webinar-scripting5.png
537d1d8e68b4736f1470a217_iconmonstr-laptop-2-icon.svg

Desktop Application

gvSIG Desktop is a powerful geographic information system (GIS) designed to offer a free solution to all needs related to geographic information management.

537d01f2661cf74612a2ef6c_iconmonstr-sitemap-7-icon.svg

Scripting Framework

New module for gvSIG 2.x that will help you to create your own tools using Jython (it’s like Python), easy language even if you never write code before.

5387cc22197afdfe785e2f3f_primerospasos6.png


So.. What is gvpy?

Less code, more powerful

This library will help you to develop your tools quickly. Also, now is not available execute any geoprocess from your script. This will allow you to use one powerful extension like SEXTANTE with one line of code. 

5388586a2209c0364f2cf47b_gsoc_exec.png
Execute your tool with one click
537d1e073d0e0acf48d07dd5_iconmonstr-save-9-icon.svg

Scripts

You can check in my blog masquesig.com a lot of examples about this, how to create shapes with scripts, features, geometries... Sometimes can be a little bit tricky and require practice with gvsig code. 

But with gvpy..

You could create the image above with one click, and i’m sure you will undertand all the code you need. It will be like this:


from gvpy import *

def main(*args):
        layer = gvsig.currentLayer()       #Base layer

        #Create new shapes
        layer1 = newLayer(layer,"C:/gvsig/point_shape.shp", 1)
        layer2 = newLayer(layer,"C:/gvsig/line_shape.shp", 2)
        layer3 = newLayer(layer,"C:/gvsig/polygon_shape", 3)

        #Add new features
        addFeature(layer1, "point", "01", [50,80])          #New Points 
        addFeature(layer1, "point", "02",[150,50])
        addFeature(layer1, "point", "03",[100,10])
        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
        addField(layer1,"Name")
        removeField(layer1,"Name")

        #Execute SEXTANTE: algorithm ’perturbate points’
        r = gvpy.runalg("perturbatepointslayer", LAYER = layer1,MEAN = 5, STDDEV = 5 )


Easy, right?

537d1d8e68b4736f1470a217_iconmonstr-laptop-2-icon.svg

You could find more info on my blog masquesig.com
and the code in Github.


Any help will be appreciated, you can contact with me here: masquesig@gmail.com

5387ce4512f151344fc4da30_oscarmartinez.png
Óscar Martínez