Skip to main content
removed appreciation; made into question
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

I am wondering if there is a way to create a .vrt using a shapefile, but specifying attributes through a where clause. I have made a .vrt from a sub section shapefile (pre selected the tiles and exported as a new file) using the following:

 gdalbuildvrt -tileindex fullpath output.vrt area4.shp

But I would like to not have to create new shapefiles based on selected areas, so something like:

 gdalbuildvrt -tileindex fullpath WHERE areaid = 4 output.vrt area4.shp

Any advice is appreciated?

I am wondering if there is a way to create a .vrt using a shapefile, but specifying attributes through a where clause. I have made a .vrt from a sub section shapefile (pre selected the tiles and exported as a new file) using the following:

 gdalbuildvrt -tileindex fullpath output.vrt area4.shp

But I would like to not have to create new shapefiles based on selected areas, so something like:

 gdalbuildvrt -tileindex fullpath WHERE areaid = 4 output.vrt area4.shp

Any advice is appreciated

I am wondering if there is a way to create a .vrt using a shapefile, but specifying attributes through a where clause. I have made a .vrt from a sub section shapefile (pre selected the tiles and exported as a new file) using the following:

 gdalbuildvrt -tileindex fullpath output.vrt area4.shp

But I would like to not have to create new shapefiles based on selected areas, so something like:

 gdalbuildvrt -tileindex fullpath WHERE areaid = 4 output.vrt area4.shp

Any advice?

Source Link
Ryan Garnett
  • 9.5k
  • 8
  • 62
  • 108

Create VRT from shapefile using a where clause

I am wondering if there is a way to create a .vrt using a shapefile, but specifying attributes through a where clause. I have made a .vrt from a sub section shapefile (pre selected the tiles and exported as a new file) using the following:

 gdalbuildvrt -tileindex fullpath output.vrt area4.shp

But I would like to not have to create new shapefiles based on selected areas, so something like:

 gdalbuildvrt -tileindex fullpath WHERE areaid = 4 output.vrt area4.shp

Any advice is appreciated