[Gdal-dev] Re: cursor and a few questions
Frank Warmerdam
warmerdam at pobox.com
Tue Dec 3 16:45:30 EST 2002
gwalter at atlsci.com wrote:
> My concerns are as follows:
> Both methods: Rendering might become really slow
Gillian,
I am not sure why rendering would become really slow. One thing to
note is that updating the position of the symbol will invalidate
the current view, resulting (eventually) in a redraw, but the redraw
does not take place immediately. The redraw is delayed in the usual
way after changes have been made.
Of course, with software rendering it will still be kind of choppy
but no more than any other interactive technique when using
software rendering.
> Method 2: I'd have to be careful to avoid problems with the
> Selection/ROI tool etc in linked views- if the points layer accidentally
> got on top of the layer being operated on, we could have difficulties
> (active layer would have to remain the original layer).
The tricky part is to ensure the cursor layer doesn't show up to the
user as something to interactive with, and that it not become the selected
layer. I think we need some sort of flag we can set on a layer to "hide"
it from the user. Mostly this would ensure the user doesn't see it in
the layer dialog but there might be other respects in which we need to
be careful too.
> Also, I was wondering about the timeframe you envisioned for the VRT
> scaling/upside down symbol/flying label problems (which we hope to have
> solved before our next release, sometime early next year). I could also
> work on some of these, but I'm not sure which would be the best one for
> me to start on.
I did most of the work on VRT support for scaling the weekend before last,
but I had intended to some extra steps to make it more obvious how it worked,
and to be able to crate VRT files "in memory" without having to write the
VRT portion to disk.
If you look at gdal_translate now you will see that the scaling is
accomplished using VRT files now. You may note in the code that the
AddComplexSource() method is called on poVRTBand to install scaling
instead of AddSimpleSource. You might want to use gdal_translate to
scale an image and write the result to VRT format. This should result
in gdal_translate just writing the VRT file with the scaling enabled.
From that you can deduce how to create the VRT description yourself
in Python.
I would add that it is possible to pass the entire contents of the VRT
file as a string to gdal.Open() and it will get opened "as if" it were
reading the file from disk.
The fixes for out-of-place labels should be done within the next three
weeks as well as investigating the upsidedown raster problem. It may
well be that for your next release you should disable the display list
support by default if we don't completely trust it yet.
You might also want to look into the upside rasters yourself if you
have time. The raster symbol rendering support is in the
gv_shapes_draw_symbol() function in gvshapeslayer.c.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list