[postgis-devel] [gdal-dev] [WKTRaster] WKT Raster band to GDAL band

Jorge Arevalo jorgearevalo at gis4free.org
Tue Mar 9 06:54:16 PST 2010


On Tue, Mar 9, 2010 at 2:39 PM, Pierre Racine
<Pierre.Racine at sbf.ulaval.ca> wrote:
>>> You know how to quickly display geometries? Do you? I use OpenJump.
>>>
>>I've used QGis. I'll try OpenJump. Thanks for advice.
>
> With OpenJump you make any query to PostGIS and display the fetched geometries. I don't know if you can do this with QGIS.

With QGIS you can open PostGIS tables, previously filled by
GeometryFromText(WKT). I'll test OpenJump, anyway. Looks faster and
simpler.

>
>>> If it would be useful to you, then it would probably be useful to us...
>>>
>>
>>Ok, I'll propose it in the specs at wiki.
>>
>>
>>> By the way: I saw that your code does not handle the SRID. That means ST_AsPolygon(raster, integer)
>>-> geomval set would have to get it itself from the raster. Maybe it would be more efficient to
>>include it in the wktgeomval structure so ST_AsPolygon could use it directly in
>>ST_GeometryFromText(text WKT, SRID) without having to query the raster again.
>>>
>>
>>Yes. I might access the SRID from the rt_raster object that contains
>>the band. Mmmm... now I remember. About the GeoTransform, I thought in
>>using rt_raster_get_x_offset(), rt_raster_get_pixel_width(),
>>rt_raster_get_x_rotation(), rt_raster_get_y_offset(),
>>rt_raster_get_y_rotation(), rt_raster_get_pixel_height(), as you said,
>>instead of the default {0.0, 1.0, 0.0, 0.0, 0.0,1.0 }, but in the
>>method I only have the rt_band. These kind of things made me think
>>about getting the raster object from the band.
>
> I'm wondering if the solution to all those problems would not be to add the raster as a parameter to your rt_raster_as_wktpolygon function.... You could then access any function you need.
>
Yes, is a solution. Now, my (rhetorical) question is: why did I think
this function must take only the context and the band as parameters?
Seems to be a self-imposed constraint I can't remember just now...
because we didn't agree to do it in that way. I'm reading the specs...
Nah, sorry. I've been working in a totally different project these
weeks (not my decission), and I missed something (probably the common
sense)

Best regards,
Jorge

> Pierre
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list