[OpenLayers-Users] How to use best use python script with Open Layers?
Phil Scadden
p.scadden at gns.cri.nz
Tue Jul 29 14:26:23 PDT 2014
> I know only part of this question is relevant to Open Layers. I am using Open
> Layers with some layers served by Geoserver. I have a python script that
> takes user input from the web page, and returns a GeoJSON file. What is the
> best way to use a python script to accomplish this? Is there a preferred
> method for where I put the python script, and call it in a Geoserver/Open
> Layers framework?
I would get a basic tutorial on how to create a web application. What
development environment (netbeans, eclipse,?) are you using to create
your deployment WAR?
The short answer is that you have your webpage, myapp.html. Your scripts
normally would be in a subdirectory of the directory that is in. My
webapp directory usually looks something like this.
webapps/myapp
index.html
/css
/images
/scripts -> this is where I put serverside part of
application
/META-INF
/WEB-INF
The full url for the script is thus myserver/myapp/scripts/myscript.py
but your app can refer to it as
scripts/myscript.py and not worry about absolute location (so it works
on development machine, test server and production server without
alteration).
The development environment usually builds the minimal structure for
you. If your script is being shared between multiple applications you
may want a global context to locate it in but setting that up is highly
dependent on what server you use.
Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.
More information about the Users
mailing list