_______________________________________________
postgis-users mailing list
postgi...@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Yes, it's usgs ned. And I initially went with one table for each input tile, but I didn't know how to join (or union) them together for my query.
raster2pgsql
loader uses this function to register raster tables". Are you saying I should specify constraints that will be similar across all tables?wkt = sys.argv[1] # Polygon shape in WKT formatraster_type = 'GTiff'table_name = 'dem_elevation'map_srs = 900913table_srs = 4269sql_text = 'SELECT ST_AsGDALRaster(ST_CLIP(ST_Union(rast), ST_GeomFromText(\'%s\',%i)),\'%s\') FROM "%s" WHERE ST_Intersects(rast, ST_Transform(ST_GeomFromText(\'%s\',%i),%i))' % (wkt, map_srs, raster_type, table_name, wkt, map_srs, table_srs)
Sorry to bring up an old thread, but the following question is related to my previous discussion. The queries generated by my app returns rasters with one or two of the borders containing nothing but NODATA values. See attached files for an example. The query generated for the sample is:SELECT ST_AsGDALRaster(ST_CLIP(ST_Union(rast), ST_GeomFromText('POLYGON((-10401496.01812 5106173.6751207,-10401119.641642 5106173.6751207,-10401119.641642 5106363.1552702,-10401496.01812 5106363.1552702,-10401496.01812 5106173.6751207))',3857)),'AAIGrid',ARRAY['FORCE_CELLSIZE=YES']) FROM "dem_elevation" WHERE ST_Intersects(rast, ST_Transform(ST_GeomFromText('POLYGON((-10401496.01812 5106173.6751207,-10401119.641642 5106173.6751207,-10401119.641642 5106363.1552702,-10401496.01812 5106363.1552702,-10401496.01812 5106173.6751207))',3857),4269))I'm thinking it may have something to do with the partitioning, but I couldn't really be sure. Furthermore, I don't think it has anything to do with the size of the tiles in the table, because if I shrink the example area above, I still get a border of NODATA values.Thank you in advance for your assistance!