Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in QGIS vectorlayers can be intersected. That is apparently done by ftools and seems to be integrated into the QGIS-program itself.

That is different from many other functions that call GDAL-tools.

I would like to intersect esri-shapefiles in a script and without having to load anything into QGIS. Is there a GDAL-tool or some other commandline-suite that will do this?

It would be nice to have a tool that handles the shapefile natively (GDAL-tools do that) without having to import it or convert it to some internal format.

An alternate solution would be a commandline-interface to ftools.

THX stn

share|improve this question

This post on the gdal-dev mailing list by Warmerdam himself says it's not possible with gdal tools directly, but it can be programmed using one of the available language wrappers (i.e. Python):

The key method is OGRGeometry::Intersection() which when invoked on one geometry with another geometry will return a new geometry which is their intersection.

Note that this method depends on GDAL/OGR having been built against the GEOS geometry library which really does the work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.