[GRASS-dev] How to create a vector tile index from GRASS raster maps?

Helmut Kudrnovsky hellik at web.de
Mon Jan 16 04:31:44 PST 2017

Markus Neteler wrote
> Hi,
> I received DEM data in about 9000 tiles and wanted to generate a tile
> index for easy lookup (like gdaltindex does).
> Is there anything already available?

no idea if there is a raster equivalent in pygrass; what I've done in a
script with pygrass for vectors:

if print_bbox_vector_geometries :
		# open vector
		vtopo = VectorTopo(vector)
		vtopo.open(mode = 'r')
		# loop thru vector geometries		
		for i in range(1, vcats_max_plus):
				# get vector geometries area info
				vect_geom_area = Area(v_id = i, c_mapinfo = vtopo.c_mapinfo)
				# get vector geometries bbox info				
				vect_geom_bb = vect_geom_area.bbox()
				# bbox north, south, west, east
				bb_north = vect_geom_bb.north
				bb_south = vect_geom_bb.south
				bb_west = vect_geom_bb.west
				bb_east = vect_geom_bb.east
				grass.message("cat %s: north: %s south: %s west: %s east: %s" %(i,
bb_north, bb_south, bb_west, bb_east))
		# close vector

maybe then feed back these coordinates in pygrass to build a vector tile

best regards
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-create-a-vector-tile-index-from-GRASS-raster-maps-tp5303596p5303609.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

More information about the grass-dev mailing list