[Gvsig_english] Scripting to draw a line in the gvSIG

gracecwl gracecwl at sains.com.my
Tue Apr 8 02:31:40 CEST 2008


Hi Pablo Piqueras Bartolomé,

Thx for your provided idea.Actually, we plan to add a function whereby the
gvSIG can provide 'theme' to the user. Then 'theme' idea, we hope to add in
the scripting python. So whenever user run the script, it will open a dialog
box for user to check/uncheck which layers they wish to view. And the info
for the layer is actually taken from the mySQL. 

We very appreaciate your help in guide us the way to write the script.
Franky, we still no familiar with the library in the gvSIG.




thanks and regrads,
grace

Pablo Piqueras Bartolomé wrote:
> 
> Hello,
> 
> I'll try to help you  some steps summarized:
> 
> 1.- Connect to your /mySQL/ database using a suitable driver.
> 2.- Hold the connection.
> 3.- Use that connection to execute the query you want to the database.
> 4.- Process the response, getting the points.
> 5.- Get reference to the current actived view's MapControl.
> 6.- Get the MapControl's layer where you want to write. (The layer to 
> modify must be editable).
> 7.- Draw the line. The easiest way to do this (assuming the layer is 
> vector(ial)) is writting  directly at the layer's /graphics/. You should 
> get the equivalent screen point coordinates of the points got from the 
> database (use the MapControl's ViewPort to do this: 
> Viewport#fromMapPoint(Point2D point)).
> 
> 
> ----------------------------------
> 
> Some interesting links:
> 
> - Python in /gvSIG/:
> http://www.gvsig.gva.es/fileadmin/conselleria/images/Documentacion/descargas/manuales/gvsig-1_0-scripting-tutorial-v2-en.zip
> 
> - Python: http://www.python.org/
> 
> - MySQL: http://www.mysql.com/
> 
> 
> ----------------------------------
> 
> Regards.
> 
> 
> 
> gracecwl escribió:
>> Hi Pablo Piqueras Bartolomé
>> ,
>>
>> I like to Draw a line provided data is in the mySQL. therefore, i need
>> script to call the data out from the mySQL to draw a line, point or
>> polygon
>> in the gvSIG. i have read throught the tutorial, the example show is draw
>> a
>> point provided data is in the excel data file. 
>>
>> Hope you can share any idea to solve this problem
>>
>> thanks and regards,
>> grace
>>
>> Pablo Piqueras Bartolomé wrote:
>>   
>>> Grace Chai escribió:
>>>     
>>>> Hi all,
>>>>
>>>> I have no idea how to write a script which can support drawing a line 
>>>> in the gvSIG. anyone can help in this matter.
>>>>
>>>>
>>>>
>>>> thanks and regards,
>>>> Gling
>>>> _______________________________________________
>>>> Gvsig_internacional mailing list
>>>> Gvsig_internacional at runas.cap.gva.es
>>>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>>>>
>>>>
>>>>       
>>> Hello,
>>>
>>> if you'd explained more what you want to do, we'll probably could help
>>> you.
>>>
>>> -------------
>>>
>>> You can find a tutorial in English of /Jython/, (an scripting language 
>>> that gvSIG supports) at the following link: 
>>> http://www.gvsig.gva.es/fileadmin/conselleria/images/Documentacion/descargas/manuales/gvsig-1_0-scripting-tutorial-v2-en.zip
>>>
>>>
>>> Regards.
>>>
>>> -- 
>>> Pablo Piqueras Bartolomé
>>>
>>> Equipo de gvSIG
>>> IVER T.I. S.A.
>>> C/. Lérida, 20
>>> 46005 - Valencia (Spain)
>>> www.iver.es
>>> www.gvsig.com
>>>
>>>
>>>
>>> Este mensaje y sus archivos son confidenciales. No está permitida su
>>> reproducción o distribución sin la autorización expresa de "IVER
>>> Tecnologías de la Información". Si usted no es el destinatario previsto,
>>> queda desautorizado cualquier uso, acceso o copia de este mensaje. Si ha
>>> recibido este mensaje por error, por favor bórrelo e infórmenos por esta
>>> misma vía.
>>>
>>> _______________________________________________
>>> Gvsig_internacional mailing list
>>> Gvsig_internacional at runas.cap.gva.es
>>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>>>
>>>
>>>     
>>
>>   
> 
> 
> -- 
> Pablo Piqueras Bartolomé
> 
> Equipo de gvSIG
> IVER T.I. S.A.
> C/. Lérida, 20
> 46005 - Valencia (Spain)
> www.iver.es
> www.gvsig.com
> 
> 
> 
> Este mensaje y sus archivos son confidenciales. No est� permitida su
> reproducci�n o distribuci�n sin la autorizaci�n expresa de "IVER
> Tecnolog�as de la Informaci�n". Si usted no es el destinatario previsto,
> queda desautorizado cualquier uso, acceso o copia de este mensaje. Si ha
> recibido este mensaje por error, por favor b�rrelo e inf�rmenos por esta
> misma v�a.
> 
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at runas.cap.gva.es
> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
> 
> 

-- 
View this message in context: http://www.nabble.com/Scripting-to-draw-a-line-in-the-gvSIG-tp16438458p16544003.html
Sent from the gvSIG international mailing list archive at Nabble.com.




More information about the Gvsig_internacional mailing list