This week I’ve written the code of an almost-finished-basic-version of the read-only driver.
Why almost? Because I have to perform a spatial query, looking for all raster blocks that contains one point (the center of each block). In case of regularly-blocked rasters, I’ll get only one block. Instead of this spatial query, I have a testing one, always reading the same block of data.
And why basic? Because the driver only works for rasters with 8 bits/pixel, and one band of grey colour (colour statically returned, from now)
Apart from this, the driver seems to work. Here, the exit for command
gdalinfo -mm -stats -checksum "PG:host='localhost' dbname='gsoc09_test' user='postgres' password='postgres' table='usa_mountain_one_band' where='rid > 0'"
Yes, there is an error. And it’s related with the fact that the Coordinate System description doesn’t have a part with UNIT[“metre”,1,AUTHORITY[“EPSG”,”9001″]]. So, gdalinfo thinks that the coordinate units are degrees, and take the UTM coordinates (the original image coordinates) as invalid angle values. I suppose that the error was to choose an invalid srid (4267) when loading the data on PostGIS, but I’m not sure yet.
Oh, I sent the midterm evaluation this week, almost forget it…
Planned work for next week
- Fix the problem with “Invalid angle”.
- Change the testing query for a real one.
- Continue working to extend the basic driver to a more general one.
Basically, some segmentation faults and memory leaks when moving over the HEXWKB representation of the raster. Solved, from now.