[postgis-devel] [PostGIS] #478: [wktraster] There seems to be an offset in ST_Envelope or ST_Box2D

PostGIS trac at osgeo.org
Mon Apr 5 15:08:34 PDT 2010


#478: [wktraster] There seems to be an offset in ST_Envelope or ST_Box2D
------------------------+---------------------------------------------------
  Reporter:  robe       |       Owner:  pracine        
      Type:  defect     |      Status:  new            
  Priority:  medium     |   Milestone:  WKTRaster 0.1.6
 Component:  wktraster  |     Version:  trunk          
Resolution:             |    Keywords:                 
------------------------+---------------------------------------------------
Comment (by robe):

 Jorge,

 Not sure Pierre answered your question.  I didn't use any plugin for the
 image. Or at least I think it built into the core of OpenJump, but I do
 have a lot of plugins.

 OpenJump allows you to overlay raster images on top of spatial data
 similar to QGIS.

 So for the image part.
 1) I did file->open file (in the file options I get tiff, jpg,png, jpeg as
 options
 and then picked the  wonderpostgis_banner.png I had used to load my db
 with.

 2) Then I used the Layer -> Run Datastore Query -- point at my PostGIS
 connection (instance is the database name)

 {{{
 SELECT ST_AsBinary(ST_Envelope(rast))
 FROM wonderpostgis;

 }}}

 It still seems to sit above my picture using latest trunk.  I tried the
 same thing in QGIS and does the same thing.

 For QGIS since it doesn't support ad-hoc queries -- I created a view and
 used the view.  For raster layer -- used Add Raster Layer option


 {{{
 CREATE OR REPLACE VIEW vwextent
 AS
 SELECT rid, ST_Envelope(rast) As geom
 FROM wonderpostgis;
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/478#comment:8>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list