[gdal-dev] clipping multiple shapefiles from a set of clipping polygons

Eli Adam eadam at co.lincoln.or.us
Tue Oct 9 09:14:20 PDT 2012


On Tue, Oct 9, 2012 at 3:41 AM, maning sambale
<emmanuel.sambale at gmail.com> wrote:
> I see, is there a scripting workaround using 1.9?

ogr2ogr has various -clip..... options.  It looks like you could
specify using a particular feature in the AdminPoly to do this
(presumably GEOS support is required?).

ogr2ogr -f "ESRI shapefile" output.shp input.shp -clipsrc
AdminPoly.shp -clipsrclayer AdminPoly -clipsrcsql "SELECT * FROM
AdminPoly WHERE AttributeName_in_AdminPoly='Some_value'"

If you don't have other requirements for the stable release, there are
lots of binaries including nightly builds for some platforms,
http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries

HTH, Eli


>
> On Mon, Oct 8, 2012 at 9:14 PM, Etienne Tourigny
> <etourigny.dev at gmail.com> wrote:
>> generally speaking new features do not go into current stable version
>> (1.9), they will be incorporated into next stable version (probably
>> 2.0).
>>
>> Etienne
>>
>> On Mon, Oct 8, 2012 at 9:57 AM, Ari Jolma <ari.jolma at gmail.com> wrote:
>>> On 10/08/2012 03:21 PM, maning sambale wrote:
>>>
>>> Thanks! Is this implemented already in the stable build?
>>>
>>>
>>> It's currently only in the trunk version.
>>>
>>> Ari
>>>
>>>
>>> Maning Sambale (mobile)
>>>
>>> On Oct 8, 2012 7:28 PM, "Ari Jolma" <ari.jolma at gmail.com> wrote:
>>>>
>>>> On 10/08/2012 02:13 PM, maning sambale wrote:
>>>>>
>>>>> HI,
>>>>>
>>>>> I have a shapefile polygon that contains administrative boundaries and
>>>>> a several shapefile of various features.  I want to create separate
>>>>> shapefiles of each layer feature for each administrative boundaries in
>>>>> the clipping layer.
>>>>>
>>>>> For example,
>>>>>
>>>>> AdminPoly1
>>>>>   - AdminPoly1_point.shp
>>>>>   - AdminPoly1_line.shp
>>>>>   - AdminPoly1_poly.shp
>>>>>
>>>>> AdminPoly2
>>>>>   - AdminPoly1_point.shp
>>>>>   - AdminPoly1_line.shp
>>>>>   - AdminPoly1_poly.shp
>>>>>
>>>>> and so on.
>>>>>
>>>>> Any advice?
>>>>
>>>>
>>>> Maning,
>>>>
>>>> The new layer methods may be what you're looking for:
>>>> http://trac.osgeo.org/gdal/wiki/LayerAlgebra
>>>>
>>>> Ari
>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> --
> cheers,
> maning
> ------------------------------------------------------
> "Freedom is still the most radical idea of all" -N.Branden
> wiki: http://esambale.wikispaces.com/
> blog: http://epsg4253.wordpress.com/
> ------------------------------------------------------
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list