[postgis-users] Raster + Geometry Intersection

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Feb 27 06:53:57 PST 2012


> I checked the srids of the geometry and the rasters and they are both now set to
> --> 900913!

But you loaded the raster with -s 900913. Right? That does not make the raster coordinates to be transformed. You actually corrupted your rasters. You have to load them in their proper srid (4326) and reproject them afterward (or reproject the geometries) to 900913. I would go with reprojecting the geometries.

> I was using qgis and I think I made a mistake because I think the tif files on disk
> are using srid = 4326, while the postgis layer I added was using 900913 for osm.
> I have never used OpenJump.. is it possible to view both my raster and road
> geometries from postgis on to qgis? Or you recommend installing OpenJump?

I do. It's still the best/stable tool to work both raster and vectors. You can't display raster but you can display their extent and their vectorization (with ST_DumpAsPolygon()) as in the tutorial.

> Also, do I still need to do some sort of reprojection on the geometries? Is the
> SRID of 900913 reported for my rasters...reliable information?

Again, the loader do not reproject. It just assign the srid you tell him. You have to reproject at some point (before or after loading, before or while intersecting).

Pierre



More information about the postgis-users mailing list