[Qgis-user] documentation for clip_shp_to_shp

Werner Macho werner.macho at gmail.com
Tue May 21 04:10:49 PDT 2013


Hi!
Still.. That script has no relation to QGIS and there is no use to execute
it in QGIS ..
That script is a so called "standalone" script that uses the GDAL Binaries
(ogr2ogr)
to execute that script you must have python and GDAL installed and in your
PATH ..

and no .. you dont neet to give anything on the commandline as parameters

the
clip_shp_to_shp(directory, shpclip)
in the last line is calling the clip_shp_to_shp function with 2 parameters
- which are set inside the script before ..
the 2 "missing parameters" are optional as the have default values in the
function definition
(def clip_shp_to_shp(directory, shpclippath, pref="", suf="_clip"):)

Before we dig deeper into it .. Which Operating System are you using?
And .. you should read about installing and using python on your operating
system ..

hope this helps
kind regards
Werner




On Tue, May 21, 2013 at 12:59 PM, Silver Ashen <silver.ashen at gmail.com>wrote:

> Thank you Werner Macho,
>
> My questions will be a little bit silly but the world of all those library
> and module and languages, and all that stuff is still very dark to me.
>
> When you say that I have to copy the script in the shape directory, this
> means that I copy the text in Python language with notepad++ and save it in
> the good directory ? But  then, how do I execute it in QGIS ? From which
> console ?
>
> Is the shpclip that you mention the same as shpclippath which is the
> second parameter of clip_shp_to_shp ? Am I not forgetting to specify the
> directory to ?
>
> Concerning ogr2ogr, after a quick search in my windows explorer, I saw
> that I have ogr2ogr.py, .php, .pyc, .exe.
>
> Is it enough to work ?
>
> Thanks again.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130521/4832b34f/attachment.html>


More information about the Qgis-user mailing list