[Gfoss] clip

Francesco Geri francescogeri a yahoo.it
Mer 14 Dic 2011 13:32:55 CET


Salve.
Ho alcuni shapefile di grosse dimensioni che devo tagliare su dei confini. Ho provato a farlo direttamente con ogr2ogr visto che sia qgis che gvsig (non ho provato con grass) impiegavano tempi biblici.
La stringa che ho utilizzato è più o meno la seguente:
ogr2ogr -clipsrclayer layer.shp output.shp input.shp
oppure 
ogr2ogr -clipsrc layer.shp output.shp input.shp

Nel primo caso mi restituisce il layer in input ma non tagliato, mentre nel secondo mi da errore perchè non riconosce il datasource.

Qualcuno ha mai provato? 


P.S.: Sto provando a tagliare con postgis in questo momento. Utilizzo la seguente query:
create table grid_cut as select g."campo1",Intersection(g.the_geom, f.the_geom) AS the_geom from layer1 f, layer2 g where f.the_geom && g.the_geom and Intersects(g.the_geom, f.the_geom);

Con spatialite funzionerebbe?

Grazie a tutti!

Francesco
-------------- parte successiva --------------
Un allegato HTML ? stato rimosso...
URL: <http://lists.gfoss.it/pipermail/gfoss/attachments/20111214/feb07f13/attachment.html>


Maggiori informazioni sulla lista Gfoss