Hi It seems like you transformed the polygon used in the st_intersects function, but the polygon used in the st_clip function still has the 3857 srid.
Åsmund On Thu, May 22, 2014 at 1:04 AM, Jayson Gallardo <[email protected]>wrote: > I was finally able to restore my database dump today. However, upon > testing, I get this error: > > > production=# SELECT ST_AsGDALRaster(ST_CLIP(ST_Union(rast), > ST_GeomFromText('POLYGON((-10366992.073461 5117898.5805526,-10366635.506271 > 5117898.5805526,-10366635.506271 5118206.0551587,-10366992.073461 > 5118206.0551587,-10366992.073461 5117898.5805526))',3857)),'GTiff') FROM > "dem_elevation" WHERE ST_Intersects(rast, > ST_Transform(ST_GeomFromText('POLYGON((-10366992.073461 > 5117898.5805526,-10366635.506271 5117898.5805526,-10366635.506271 > 5118206.0551587,-10366992.073461 5118206.0551587,-10366992.073461 > 5117898.5805526))',3857),4269)); > NOTICE: Geometry provided does not have the same SRID as the raster. > Returning NULL > > > However, all my DEMs are in the raster with SRID 4269. My DEMs have been > partitioned however, but the restore should have restored all that back > into place, right? > > This is what I have for dem_elevation in pgAdmin: > > -- Table: dem_elevation > > -- DROP TABLE dem_elevation; > > CREATE TABLE dem_elevation > ( > rid integer NOT NULL, > rast raster, > CONSTRAINT dem_elevation_pkey PRIMARY KEY (rid) > ) > WITH ( > OIDS=FALSE > ); > ALTER TABLE dem_elevation > OWNER TO postgres; > GRANT ALL ON TABLE dem_elevation TO postgres; > GRANT SELECT, REFERENCES, TRIGGER ON TABLE dem_elevation TO postgis_reader; > > And one of the dependents: > > -- Table: dem_elevation_n33w090 > > -- DROP TABLE dem_elevation_n33w090; > > CREATE TABLE dem_elevation_n33w090 > ( > rid serial NOT NULL, > rast raster, > CONSTRAINT dem_elevation_n33w090_pkey PRIMARY KEY (rid), > CONSTRAINT enforce_height_rast CHECK (st_height(rast) = 50), > CONSTRAINT enforce_max_extent_rast CHECK > (st_coveredby(st_convexhull(rast), > '0103000020AD1000000100000005000000863D2B1A098056C03B126100F5FE3F40863D2B1A098056C09578563412804040CA451840BD3F56C09578563412804040CA451840BD3F56C03B126100F5FE3F40863D2B1A098056C03B126100F5FE3F40'::geometry)), > CONSTRAINT enforce_num_bands_rast CHECK (st_numbands(rast) = 1), > CONSTRAINT enforce_out_db_rast CHECK (_raster_constraint_out_db(rast) = > '{f}'::boolean[]), > CONSTRAINT enforce_pixel_types_rast CHECK > (_raster_constraint_pixel_types(rast) = '{32BF}'::text[]), > CONSTRAINT enforce_same_alignment_rast CHECK (st_samealignment(rast, > '010000000097C6CEA0C845183F97C6CEA0C84518BF863D2B1A098056C0957856341280404000000000000000000000000000000000AD10000001000100'::raster)), > CONSTRAINT enforce_scalex_rast CHECK (st_scalex(rast)::numeric(16,10) = > 0.000092592592593::numeric(16,10)), > CONSTRAINT enforce_scaley_rast CHECK (st_scaley(rast)::numeric(16,10) = > (-0.000092592592593)::numeric(16,10)), > CONSTRAINT enforce_srid_rast CHECK (st_srid(rast) = 4269), > CONSTRAINT enforce_width_rast CHECK (st_width(rast) = 50) > ) > INHERITS (dem_elevation) > WITH ( > OIDS=FALSE > ); > ALTER TABLE dem_elevation_n33w090 > OWNER TO postgres; > GRANT ALL ON TABLE dem_elevation_n33w090 TO postgres; > GRANT SELECT, REFERENCES, TRIGGER ON TABLE dem_elevation_n33w090 TO > postgis_reader; > > -- Index: dem_elevation_n33w090_rast_gist > > -- DROP INDEX dem_elevation_n33w090_rast_gist; > > CREATE INDEX dem_elevation_n33w090_rast_gist > ON dem_elevation_n33w090 > USING gist > (st_convexhull(rast)); > > Thanks for your help in advance, > Jayson > > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
