From: Dan P. <pu...@co...> - 2003-03-30 21:09:13
|
Hi Paul, I've changed label_font.set_font_part('Family', 'times') to label_font.set_font_part('Family', 'arial') for both the legend label font and the legend title font in gvlegenddlg.py. It doesn't solve the problem. The problem may actually be with my installation of 1.5.4. For some reason, it was choking on setfw.bat. I unloaded the zip file to c:\openev_fw. However, setfw.bat couldn't get past IF exist %OPENEV_FW_DIR%\PROJ_LIB goto skip_err where the first line of code in the setfw.bat reads set OPENEV_FW_DIR=C:\openev_fw The only way I could get past this was to comment out this line, and replace it with goto skip_err I was finding things a bit unstable using this approach, but OpenEV was generally working. Dan Paul Spencer wrote: > Dan, this is what I get. I suspect that the issue is related to fonts. > If you are not adverse to a little hacking, open > c:\openev_fw\pymod\gvlegenddlg.py. You will see some references to > "times", this is the default font if no preference is set. Try changing > this to arial or verdana. > > The legend capability was written for a client application I wrote based > on OpenEV as the API and I wrote a new interface. That application > included a preference manager that allowed all sorts of control over the > legend including font size, color, type and spacing and size of the > color swatches. These can all be accessed in OpenEV but there is no way > to set them. > > You could do a quick search of this file for gview.get_preference to see > what you can actually tweak without changing the code. Then you could > play with openev.py and add a bunch of gview.set_preference( ) calls to > establish the values you want. > > HTH > > Paul > > Dan Putler wrote: > >> Hi Paul, >> >> I'm not getting a DOS python console window after performing this >> operation, which I assume is what you mean by the "command window". >> However, I'm sending the original shapefile it is based on. In >> addition, I'm sending along two png files of what was on the screen. >> >> I'm assuming DM Solutions have all the 96 Stats Can digital >> cartographic products so I'm not technically violating the Data >> Liberation Agreement. >> >> Another issue I'm having, but is likely to be a renderer issue not >> related to this, is that I'm getting black specks in my display. >> >> Dan >> >> Paul Spencer wrote: >> >>> Dan, >>> >>> I just tried this with a polygon and a line layer and it seemed to >>> work fine (on a winXP machine). Any chance you can send me (or make >>> available for download) your data and the steps you went through (or >>> a saved classification file?). Also, was there any output in the >>> command window that indicated an error? >>> >>> Cheers, >>> >>> Paul >>> >>> Dan Putler wrote: >>> >>>> Hi Paul, >>>> >>>> I've just had a chance to look at it. It is _very_ nicely done. It >>>> by far and the way the best implementation of a classifier I've seen >>>> in any of the open source GIS tools. However, the one thing that >>>> didn't work is the map legend. When I pressed on the legend button >>>> I just got a blank white window with a small block cursor outlined >>>> in black and filled with white. I did the testing using Frank's >>>> 1.5.4 version on a Windows ME machine. >>>> >>>> Dan >>>> >>>> Paul Spencer wrote: >>>> >>>>> Dan, I just checked Frank's 1.5.4 release and it is there. There >>>>> is a 'classify raster' button on the toolbar (window with a C in it >>>>> :)) that was not updated to reflect the fact that the >>>>> classification screen can now handle vector data. This >>>>> functionality hasn't been used much expect in my projects as far as >>>>> I know so please give it a try and post feedback >>>>> >>>>> Cheers >>>>> >>>>> Paul >>>>> >>>>> Dan Putler wrote: >>>>> >>>>>> Hi Paul, >>>>>> >>>>>> This is great news. >>>>>> >>>>>> I have loaded up Frank's 1.5.4 version of OpenEV, in addition to >>>>>> the 1.5.0 version available from the SourceForge site. Is this >>>>>> available in 1.5.4, or do I need to build the latest from CVS to >>>>>> get at this? >>>>>> >>>>>> Dan >>>>>> >>>>>> Paul Spencer wrote: >>>>>> >>>>>>> Dan, >>>>>>> >>>>>>> this can be done in openev using the classification dialog. I >>>>>>> recently (well, a few months ago) extended this to classify >>>>>>> vector laters in addition to raster layers. >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>> Dan Putler wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I was thinking about the ability to differentially shade >>>>>>>> polygons in a layer based on a numeric (typically a float) >>>>>>>> field. The most recent version of Thuban has this capability >>>>>>>> through what they call a "classifier", as does GIS Toolkit and >>>>>>>> GeoTools using what they call "shaders". The tools in Thuban >>>>>>>> and GIS Toolkit require a lot of user intervention (the user has >>>>>>>> to categorize the data by hand), while GeoTools (v1, but they >>>>>>>> are also likely to be in v2) provides shaders that implement >>>>>>>> some basic categorization methods (pretty much equal interval >>>>>>>> and equal frequency). On grasslist I've seen a related >>>>>>>> discussion. The advise there was that with GRASS (at least >>>>>>>> v5.0.x and below) you needed to translate a vector layer to a >>>>>>>> raster layer, edit the raster layer, say several prayers, and >>>>>>>> then you could get your map. My guess is that a similar process >>>>>>>> could be followed in OpenEV, but boy it sounds really painful. >>>>>>>> It would be much easier if these types of maps could be created >>>>>>>> directly with a vector layer in OpenEV without the need to do >>>>>>>> the raster conversion step. >>>>>>>> >>>>>>>> Hopefully this clarifies my earlier question. >>>>>>>> >>>>>>>> Dan >>>>>>>> >>>>>>>> Frank Warmerdam wrote: >>>>>>>> >>>>>>>>> Dan Putler wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> My guess is that this question is likely to have been on this >>>>>>>>>> list before, but I couldn't find it looking over the archives. >>>>>>>>>> >>>>>>>>>> My question is whether there are plans to include vector based >>>>>>>>>> choropleth mapping capabilities in OpenEV in the future, or is >>>>>>>>>> there already this capability and I'm just not clever enough >>>>>>>>>> to find it? >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Dan, >>>>>>>>> >>>>>>>>> There are no plans for chloropleth mapping that I am aware of. >>>>>>>>> >>>>>>>>> Do you mean deriving vector contour lines from a raster layer? >>>>>>>>> Generating some sort of choropleth map from random point data? >>>>>>>>> I am not >>>>>>>>> that familiar with the technique, so perhaps you could elaborate. >>>>>>>>> In part, I am wondering if it could be implemented fairly >>>>>>>>> easily in >>>>>>>>> Python using the existing rendering capabilities. >>>>>>>>> >>>>>>>>> Best regards, >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>> >> >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------ >> > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > -- _________________________________________ Dan Putler UBC Commerce Email: putler at commerce dot ubc dot ca Phone: 604-822-8329 |