Re: [Qgis-developer] color ramp manager
Zirneklitis wrote When more than 6k gradients are available, it should be much faster to create a new gradient rather then to find an appropriate one. OK, I will race you. You start making a topographic gradient, I start by looking http://soliton.vm.bytemark.co.uk/pub/cpt-city/views/topo.html here ... finished! :-) -- View this message in context: http://osgeo-org.1560.n6.nabble.com/color-ramp-manager-tp4993619p4996673.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] color ramp manager
Paolo Cavallini wrote IMHO with such high numbers, appropriate tagging filtering is the way to go. I have implemented a simple tagging scheme on the cpt-city site. If anyone would like to go through the site giving a unique tag to a set of gradients (QGIS:gravity, QGIS:topo, whatever) then I will have a list of those from which to generate a selection which can then make its way (eventually) into QGIS Cheers Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/color-ramp-manager-tp4993619p4993944.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] color ramp manager
Etienne Tourigny-3 wrote this is great. I don't think the QGis: prefix is needed though - this should be general... sure, but I mean that if you want to make a particular selection for QGIS then you can use the tagging facility to save that selection directly from the site. The prefix and/or uniqueness of the tag makes it possible for me to filter out the selection. Generic tagging is also helpful, of course Could you add relevant tags to the items in your selections? (e.g. GMT ocean should have tag bathymetry) Eventually, time permitting :-) -- View this message in context: http://osgeo-org.1560.n6.nabble.com/color-ramp-manager-tp4993619p4993949.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] color ramp manager
Paolo Cavallini wrote IMHO with such high numbers, appropriate tagging filtering is the way to go. With 6000+ gradients that is easier said than done. The site has, presently, a set of selections (blues, topo, bath and so on) which myself and Etienne have discussed as forming the basis for such QGIS sets (outline - XML file of gradient paths used to generate the cpt-city pages and also to be downloadable, these could then be used to filter the GUI, or to make specialist sub-sets of zipfiles on the QGIS side). That we will have a look at after the zip download is tested and working. As to the GUI navigation of such a large number of gradients, that is a challenge. I personally use the site itself as a selector, then when I find the one I want, I copy-paste the path (which is listed under the preview on each individual gradient's page, for exactly this purpose) into my script. eg on http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw4/tn/bhw4_003.png.index.html the path is cpt-city/bhw/bhw4/bhw4_003 I've not had time to look at the QGIS selecter, if it does not have a gradient path input (ie, no extension, no base directory) then perhaps it would be an idea to add one. Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/color-ramp-manager-tp4993619p4993698.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] color ramp manager
Etienne Tourigny-3 wrote I was thinking of an interface to make zip files from selection lists. The plugin would probably be suited for that, because it's not really part of the core and it's much easier to write this sort of thing in python. Ideally, we should have a point-n-click interface for generating these selections, but I think it would be too costly to implement. So a manual solution would probably be easiest on the short-term. Unless we feel it's necessary to have users make their own selections (by selecting favourites), and use that. Perhaps a first step would be using the cpt-city selections which can be distributed and generate a list from that. I dont think you need to make a selection topo and free, just make a selection topo, and apply it to to the set of free files, ignoring those not present. This is quite generic, it can be used on the GUI, for generating zipfiles, whatever. Selections should select only one thing, then different selections can be combined to suit. dark + spectral = dark spectral ... Do people feel that the existing cpt-city selection would be sufficient, or are there too many? If there are any others that could be useful for QGIS please send me a list of file paths .. 3) testing the rendering of the gradients (I have a solution that compares the preview to the png's on the cpt-city website) Does the GUI render SVG? I ask because the cptutils svgx program can add a preview to an svg gradient file (so it becomes self documenting), so saving the bother of a extra png file or whatever. I considered adding these previews to the SVG gradients on the cpt-city site, but with 6K files every byte in the file is 6KB on the site ... -- View this message in context: http://osgeo-org.1560.n6.nabble.com/color-ramp-manager-tp4993619p4993730.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Hi Etienne, Etienne Tourigny-3 wrote 1) a list of gradients and their variants (e.g. ColorBrewer) 2) names associated to the various directories/authors 3) metadata of your Selections. I have a first version of 2) ready. The file http://miles.shef.ac.uk/~jjg/cpt-city-svg-2.02.zip is the same as the SVG zipfile on the cpt-city site, except that all subdirectories contain a file DESC.xml, with a data dir - the subdirectory name, such as jjg name - the description of the subdirectory given in link in the parent directory Technical gradients by J.J. Green full - the first sentence (or so) of the HTML description on the corresponding page in the site Gradients mostly for technical illustration These were autogenerated by a script which filled in the first 2 fields automatically, then I cut pasted the full field by hand. The next versions of the zip file packages will contain these DESC files. Comments, suggestions welcomed Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992742.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Hi all, I'm the maintainer of cpt-city, mentioned above. Perhaps of interest is the API for the full package of gradients. I quote API because it is really just an XML file which lists the current version and names of the package files -- the idea being that software which want to keep an up-to-date copy of the archive can check this file and download the latest version if it is newer than the version it has already. Info at the bottom of the page http://soliton.vm.bytemark.co.uk/pub/cpt-city/pkg/ here . -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992348.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Hi Paolo, Thanks for stepping in. This seems the way to go. As for the licences, are we OK including all your sources in QGIS? Any of *my* sources, yes (GPL or public domain), but the gradients on cpt-city are under various licences (as listed in the files COPYING.xml). Many of these licences do not permit 3rd party redistribution or contain conditions which would be incompatible with GPL etc. One could select a GPL compatible subset, but it would miss some of the best ones and take quite a bit of work (volunteers invited!) This is why I have implemented the user download-friendly API, so that users can avoid the hassle of downloading and installing the gradients if they have a bit of software support, without software developers redistributing the gradients themselves (something similar was done with the MS Core Fonts) Incidentally, if you were thinking of adding support for reading SVG gradients, then I have some C code which will do that http://soliton.vm.bytemark.co.uk/pub/jjg/en/code/cptutils.html (see src/common/svg*) all GPLv2, or you can have a copy under any reasonable free licence if you prefer Cheers Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992375.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Paolo Cavallini wrote even more interesting! would you be willing to submit a patch/pull request for main qgis? I'm afraid I couldn't commit to that at the moment as I have so much else to do, but here is an outline: Assume that $user is a user's local data repostory (~/.qgis on unix or whatever) - have a file $user/cpt-city.urls containing a list of location of the cpt-city pkg/ directory - have a file $user/cpt-city.version containing the installed $version1 - periodically (in the background on program startup, or via user cronjob) - read the first url, $url1, from the urls file - try to fetch $url1/package.xml - if sucessful extract the $url2 from package.xml, if it is different to $url1, push it into $user/cpt-city.urls extract the $version2 from package.xml if $version2 $version1 download and install $url2/cpt-city-svg-$version2.zip update $user/cpt-city.version with $version2 else try with the next url from the urls file, ... Here the idea is that if/when the site moves, I can inform users via the package.xml file without intervention. The package is updated irregularly (when contributions arrive), but typically once a month. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992393.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Etienne Tourigny-3 wrote I have a doubt regarding licences though - it would not be ok for use to supply the files, but it would be OK to write software to fetch the data automatically? I believe this is correct. I accept contribution to the site on the explicit condition that they be free to use, i.e., that anyone can download and use them in their own work, possibly with attribution etc. I try my hardest to get people to specify a licence, but sometimes they are impossible to contact, and sometimes they just have a text like this: http://soliton.vm.bytemark.co.uk/pub/cpt-city/es/copying.html (this particularly true on deviantArt) Rather than exclude the gradients I just post the licence that they have specified. Etienne Tourigny-3 wrote Also, I was wondering if you would mind that the use of this automatic downloading in QGis could impose a burden on your site... could we host a mirror copy on qgis.org, or would that infringe on the licences? If a fetch when updated script as posted earlier is used, then there will not be a problem -- the package.xml file is very small (for the checks) and the zipfiles are a couple of MB, I can handle a few hundred downloads before I reach bandwidth limits. Formally, I think that mirroring these files would be 3rd party redistribution, so would be suspect. Etienne Tourigny-3 wrote Attached is a screenshot of the interface I made to cpt-city gradients. There are some things to improve, but it's functional. That's very nice. Let me know if there is anything I can do to the packages that would make this easier (eg, metadata in directories etc) and I will see what I can do Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992434.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Hi Etienne Etienne Tourigny-3 wrote In fact - I found that things that were missing: 1) a list of gradients and their variants (e.g. ColorBrewer) 2) names associated to the various directories/authors 3) metadata of your Selections. 1) the list of gradients is just the list of their file names, so no problem there. Variants is problematic, since who is to say what is a variant of what? This is very subjective (and what actually is the point of it?) 2) The author of each gradient can be found from COPYING.xml. If you start from a path like a/b/c/d.svg then there will be one COPYING.xml file corresponding to it, and it is in one of a/b/c/COPYING.xml a/b/COPYING.xml a/COPYING.xml i.e, a COPYING.xml applies to that directory and all subdirectories. I can see it might be useful to have a description for each subdirectory. Say - short name (same as directory name) - long name (essentialy the text in the directory link on parent directory) - description (essentially the first sentence of the page text) so seq sequential Sequential colour schemes designed by Cynthia Brewer This info in a file called DESC.xml in the directory cpt-city/cb/seq/ I'm open to suggestions on this. 3) is a different matter altogether, some of these selections are updated every day (most popular downloads etc), so I suggest we do the above first an learn the lesson before trying this ... Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992477.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Hi Etienne Etienne Tourigny-3 wrote In fact - I found that things that were missing: 1) a list of gradients and their variants (e.g. ColorBrewer) 2) names associated to the various directories/authors 3) metadata of your Selections. 1) the list of gradients is just the list of their file names, so no problem there. Variants is problematic, since who is to say what is a variant of what? This is very subjective (and what actually is the point of it?) 2) The author of each gradient can be found from COPYING.xml. If you start from a path like a/b/c/d.svg then there will be one COPYING.xml file corresponding to it, and it is in one of a/b/c/COPYING.xml a/b/COPYING.xml a/COPYING.xml i.e, a COPYING.xml applies to that directory and all subdirectories. I can see it might be useful to have a description for each subdirectory. Say - short name (same as directory name) - long name (essentialy the text in the directory link on parent directory) - description (essentially the first sentence of the page text) so seq sequential Sequential colour schemes designed by Cynthia Brewer This info in a file called DESC.xml in the directory cpt-city/cb/seq/ I'm open to suggestions on this. 3) is a different matter altogether, some of these selections are updated every day (most popular downloads etc), so I suggest we do the above first an learn the lesson before trying this ... Jim -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992478.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Raster colours
Etienne Tourigny-3 wrote Iif you use a browser interface (like I implemented) it can get very crowded. For example, the Color Brewer gradients have 7 variants each - no sense in having 7 entries for the same palette. No, there are 12 gradients with 3 segments, 12 gradients with 4, ... No actually there are 38 containing green and 72 not containing green... No actually there are ... Get my point? There are dozens of ways to categorize a set of gradients, and there is no obvious way to say which is better. How would you categorise the ds9 collection? Etienne Tourigny-3 wrote When you present the palettes in a big page (like on your website), it's ok to show them all, but in an application I find it's easier to group them. I see this as a problem which needs a creative GUI solution rather than an artificial and labour intensive categorisation. How does PhotoShop solve this problem? (I'm asking genuinely, I've never used PS). Etienne Tourigny-3 wrote I can see it might be useful to have a description for each subdirectory. Say - short name (same as directory name) - long name (essentialy the text in the directory link on parent directory) - description (essentially the first sentence of the page text) so seq sequential Sequential colour schemes designed by Cynthia Brewer This info in a file called DESC.xml in the directory cpt-city/cb/seq/ Yes that would be great, especially the description and long name. You might put all information (description and copyright) in one file though. That would not be possible since there must be one DESC for each directory, but one might not have a COPYING in each directory. Etienne Tourigny-3 wrote 3) is a different matter altogether, some of these selections are updated every day (most popular downloads etc), so I suggest we do the above first an learn the lesson before trying this ... ok. It would be cool to have xml files for those eventually, or a way to parse the web pages that contain the lists. Probably be easiest to have a fixed format XML file rather than trying to parse the HTML (which may well change) Etienne Tourigny-3 wrote Also - Tim also wrote to me that it would be interesting to distribute within QGis a selection of gradients that allow distribution. Do you know how I could search the archive for such gradients - except for the obvious grep? On your site you write those under GPL, Apache-like, Creative commons or MIT licences allow distribution (under some conditions) - which restrictions are those, are they specified per-licence or per-author ? Either you can browse the website and look at the copying links at the bottom of the page, or look at the COPYING.xml in the package (the latter generates the former). That file applies to that directory and all of its subdirectories. You will need to judge for yourself whether the licence text allows redistribution, for GPL, Apache, public domain this is clearly yes; for no distribution allowed this is clearly no, but there are some in the middle. The distributor take the legal risks and so it is only right that the distributor makes this judgement. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Raster-colours-tp4991140p4992506.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer