multiple rasters && mapview
Russell Nelson
nelson at crynwr.com
Sat Jan 8 16:54:10 CET 2005
Bernhard Reiter writes:
> > The fix is going to have to be in the way ProjectRasterFile gets
> > called. Instead of creating a BMP image, it needs to return a
> > wxImage, clipping mask, and offset.
>
> Wouldn't this make it depend on wxWidgets a GUI library? (I really
> don't know.) If possible we probably want to keep that independent.
No, it's just another binary file output type. I'm sure that GDAL
uses libtiff and libjpeg, and does the right thing if they're not
present.
> > I don't know enough about GDAL to
> > be able to do that yet.
>
> Could be a workaround to define one color that gets transformed
> to a clipping mask after projecting out of the BMP?
Loading the BMP takes a substantial amount of time. I hope to avoid
that step. With the following two prints in place, a substantial
amount of time (1/2 second approximately) occurs between the two
prints.
In renderer.py:
def draw_raster_data(self, data, format = 'BMP'):
stream = cStringIO.StringIO(data)
print "drd: begin"
image = wxImageFromStream(stream, raster_format_map[format])
print "drd: end"
bitmap = wxBitmapFromImage(image)
self.dc.DrawBitmap(bitmap, 0, 0)
Also, there simply MUST be a way to make ProjectRasterFile faster.
The amount of time it takes to draw a reasonably complex vector or
polygon layer is much, much smaller than the time it takes to render a
raster. One of the things that I think would help is a way to
communicate the "natural" scale of the map as projected back into
Thuban. If you have a UTM raster on a UTM map, and the raster is a 32
meters per pixel, then you want to make sure that the user is given an
opportunity to view the map at *exactly* 32 meters per pixel. I think
that is best accomplished by making sure that the zoom code has, as
one of its steps, the exact scale of the raster, or rasters. I
haven't even begun to look into that yet.
--
--My blog is at angry-economist.russnelson.com | Freedom means allowing
Crynwr sells support for free software | PGPok | people to do things the
521 Pleasant Valley Rd. | +1 315-323-1241 cell | majority thinks are
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP | stupid, e.g. take drugs.
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)