|
From: Valerio S. <val...@gm...> - 2015-10-22 00:03:21
|
Hello, it is known that drawing a 2D map of the world is possible: - http://www.gnuplotting.org/plotting-the-world-revisited/ - http://gnuplot.sourceforge.net/demo/world.html But, suppose that I want to: - also show the country/nation/state borders and - some of the country/nation/states need to be highlighted somehow (a different filling color than plain white would be ideal) Ideally there would be several groups of country/nation/states sharing the same filling colours Has anyone ever attempted at this ? Suggestions ? Thanks, -- Valerio |
|
From: Daniel J S. <dan...@ie...> - 2015-10-22 05:17:49
|
On 10/21/2015 07:02 PM, Valerio Schiavoni wrote: > Hello, > it is known that drawing a 2D map of the world is possible: > - http://www.gnuplotting.org/plotting-the-world-revisited/ > - http://gnuplot.sourceforge.net/demo/world.html > > But, suppose that I want to: > - also show the country/nation/state borders and > - some of the country/nation/states need to be highlighted somehow (a > different filling color than plain white would be ideal) > > Ideally there would be several groups of country/nation/states sharing > the same filling colours > > Has anyone ever attempted at this ? > Suggestions ? I've thought of doing such a thing: http://sourceforge.net/p/gnuplot/mailman/message/26788631/ Although it isn't a type of plot I'd use in my field, it would be a really nice feature given how common this type of geographical "plot" with data points is today. A command syntax is going to be the difficult part. Defining the maps is another issue. What if boundaries change? Is there some type of universally accepted data format or descriptive language for map boundaries these days? Dan > Thanks, > -- > Valerio |
|
From: Juhász P. <pet...@gm...> - 2015-10-22 18:47:57
|
On Thu, 2015-10-22 at 00:17 -0500, Daniel J Sebald wrote: > On 10/21/2015 07:02 PM, Valerio Schiavoni wrote: > > Hello, > > it is known that drawing a 2D map of the world is possible: > > - http://www.gnuplotting.org/plotting-the-world-revisited/ > > - http://gnuplot.sourceforge.net/demo/world.html > > > > But, suppose that I want to: > > - also show the country/nation/state borders and > > - some of the country/nation/states need to be highlighted somehow (a > > different filling color than plain white would be ideal) > > > > Ideally there would be several groups of country/nation/states sharing > > the same filling colours > > > > Has anyone ever attempted at this ? > > Suggestions ? > > I've thought of doing such a thing: > > http://sourceforge.net/p/gnuplot/mailman/message/26788631/ > > Although it isn't a type of plot I'd use in my field, it would be a > really nice feature given how common this type of geographical "plot" > with data points is today. A command syntax is going to be the > difficult part. Defining the maps is another issue. What if boundaries > change? Is there some type of universally accepted data format or > descriptive language for map boundaries these days? > > Dan > Two more issues that count against including high-resolution map data into gnuplot itself: - licensing - data size In more detail: The first link in the OP refers to http://www.naturalearthdata.com/downloads/ , where you can eventually download datasets for continent, lake and country boundaries in three different resolutions. It says that the dataset is in the public domain, which means that it's fine if you want to produce maps with it on your own, and it may be fine for inclusion into gnuplot (but IANAL). The highest resolution dataset that includes country borders is >5 MB compressed, which is comparable to the current size of gnuplot's binary package. There is also GSHHG, http://www.soest.hawaii.edu/pwessel/gshhg/ , which is used by software packages such as GMT or IDL, however, its license is LGPL, which is not compatible with gnuplot's license - or is it? The entire package is above 100 MB which precludes its inclusion (but it contains lower resolution datasets that are likely smaller). > "Is there some type of universally accepted data format or descriptive > language for map boundaries these days?" Universally accepted? I don't think so. However, there are many competing, widely recognized formats, ESRI Shapefile being perhaps the most used. Peter |
|
From: Daniel J S. <dan...@ie...> - 2015-10-22 19:50:11
|
On 10/22/2015 01:47 PM, Juhász Péter wrote: > On Thu, 2015-10-22 at 00:17 -0500, Daniel J Sebald wrote: >> On 10/21/2015 07:02 PM, Valerio Schiavoni wrote: >>> Hello, >>> it is known that drawing a 2D map of the world is possible: >>> - http://www.gnuplotting.org/plotting-the-world-revisited/ >>> - http://gnuplot.sourceforge.net/demo/world.html >>> >>> But, suppose that I want to: >>> - also show the country/nation/state borders and >>> - some of the country/nation/states need to be highlighted somehow (a >>> different filling color than plain white would be ideal) >>> >>> Ideally there would be several groups of country/nation/states sharing >>> the same filling colours >>> >>> Has anyone ever attempted at this ? >>> Suggestions ? >> >> I've thought of doing such a thing: >> >> http://sourceforge.net/p/gnuplot/mailman/message/26788631/ >> >> Although it isn't a type of plot I'd use in my field, it would be a >> really nice feature given how common this type of geographical "plot" >> with data points is today. A command syntax is going to be the >> difficult part. Defining the maps is another issue. What if boundaries >> change? Is there some type of universally accepted data format or >> descriptive language for map boundaries these days? >> >> Dan >> > > Two more issues that count against including high-resolution map data > into gnuplot itself: > > - licensing > - data size > > In more detail: > > The first link in the OP refers to > http://www.naturalearthdata.com/downloads/ , where you can eventually > download datasets for continent, lake and country boundaries in three > different resolutions. It says that the dataset is in the public domain, > which means that it's fine if you want to produce maps with it on your > own, and it may be fine for inclusion into gnuplot (but IANAL). > The highest resolution dataset that includes country borders is>5 MB > compressed, which is comparable to the current size of gnuplot's binary > package. Well, I would think including the data itself would be out of the question. Having it accessible is the important thing. But judging the contents of that website parts of it seem relevant. The "cultural" maps (i.e., vector outlines of countries) seem most pertinent. In the zip files I see DBF files as the largest component. The ESRI you pointed out below uses DBF. > There is also GSHHG, http://www.soest.hawaii.edu/pwessel/gshhg/ , which > is used by software packages such as GMT or IDL, however, its license is > LGPL, which is not compatible with gnuplot's license - or is it? > The entire package is above 100 MB which precludes its inclusion (but it > contains lower resolution datasets that are likely smaller). Here it looks like the World Vector Shorelines data is most useful. >> "Is there some type of universally accepted data format or descriptive >> language for map boundaries these days?" > > Universally accepted? I don't think so. > However, there are many competing, widely recognized formats, ESRI > Shapefile being perhaps the most used. I wasn't aware of ESRI; interesting stuff. Thanks. It would be a big project, and I still wonder about combining the map data with a 1) plot and 2) statistical data in a way that is easy to use. Dan |
|
From: Ethan A M. <sf...@us...> - 2015-10-22 19:55:03
|
On Thursday, 22 October, 2015 20:47:37 Juhász Péter wrote: > On Thu, 2015-10-22 at 00:17 -0500, Daniel J Sebald wrote: > > > > Although it isn't a type of plot I'd use in my field, it would be a > > really nice feature given how common this type of geographical "plot" > > with data points is today. A command syntax is going to be the > > difficult part. Defining the maps is another issue. What if boundaries > > change? Is there some type of universally accepted data format or > > descriptive language for map boundaries these days? > > > > Dan > > > > Two more issues that count against including high-resolution map data > into gnuplot itself: > > - licensing > - data size You may be responding to a message I haven't seen yet, but... I don't think Dan's comment implied incorporating the map data itself into gnuplot. The idea, I think, is that if there are standard formats for map data we might provide support for these to make it easier to read from external files. Analogous to the way we handle image formats: plot 'foo.png' binary filetype=png I don't know whether this would be useful or not. The external files might require so much pre-processing that the syntax of the final plot command is not an issue. Ethan > In more detail: > > The first link in the OP refers to > http://www.naturalearthdata.com/downloads/ , where you can eventually > download datasets for continent, lake and country boundaries in three > different resolutions. It says that the dataset is in the public domain, > which means that it's fine if you want to produce maps with it on your > own, and it may be fine for inclusion into gnuplot (but IANAL). > The highest resolution dataset that includes country borders is >5 MB > compressed, which is comparable to the current size of gnuplot's binary > package. > > There is also GSHHG, http://www.soest.hawaii.edu/pwessel/gshhg/ , which > is used by software packages such as GMT or IDL, however, its license is > LGPL, which is not compatible with gnuplot's license - or is it? > The entire package is above 100 MB which precludes its inclusion (but it > contains lower resolution datasets that are likely smaller). > > > > "Is there some type of universally accepted data format or descriptive > > language for map boundaries these days?" > > Universally accepted? I don't think so. > However, there are many competing, widely recognized formats, ESRI > Shapefile being perhaps the most used. > > > Peter > > > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
From: Juhász P. <pet...@gm...> - 2015-10-23 11:13:59
|
On Thu, 2015-10-22 at 12:37 -0700, Ethan A Merritt wrote: > On Thursday, 22 October, 2015 20:47:37 Juhász Péter wrote: > > On Thu, 2015-10-22 at 00:17 -0500, Daniel J Sebald wrote: > > > > > > Although it isn't a type of plot I'd use in my field, it would be a > > > really nice feature given how common this type of geographical "plot" > > > with data points is today. A command syntax is going to be the > > > difficult part. Defining the maps is another issue. What if boundaries > > > change? Is there some type of universally accepted data format or > > > descriptive language for map boundaries these days? > > > > > > Dan > > > > > > > Two more issues that count against including high-resolution map data > > into gnuplot itself: > > > > - licensing > > - data size > > You may be responding to a message I haven't seen yet, but... > I don't think Dan's comment implied incorporating the map data itself > into gnuplot. The idea, I think, is that if there are standard formats > for map data we might provide support for these to make it easier to > read from external files. Analogous to the way we handle image formats: > plot 'foo.png' binary filetype=png > > I don't know whether this would be useful or not. The external files > might require so much pre-processing that the syntax of the final plot > command is not an issue. > > Ethan > Well, he didn't imply that, however, the OP wanted a simple way to produce geographical plots that include country borders. To do that reliably, you have to have a proven, known dataset. What you are saying (adding support for one or more of the de facto standard GIS formats) is only halfway there - and even that raises the question of which format(s) to support, and to what extent. IMHO that alone doesn't worth the effort, as it doesn't provide real benefits compared to the situation that we have now, that is, if you want to produce nice, detailed maps, you get the data from wherever you can, in any format you can, you convert it with some external tools to a format that gnuplot can use, then plot it yourself. We might turn to systems such as R for inspiration: there the creation of maps is supported in the form of add-on packages, e.g. https://cran.r-project.org/web/packages/maps/index.html https://cran.r-project.org/web/packages/mapdata/index.html However, gnuplot does not support add-on packages like that and I think that's a can of worms we don't want to open right now. Peter |
|
From: Daniel J S. <dan...@ie...> - 2015-10-23 15:45:48
|
On 10/23/2015 06:13 AM, Juhász Péter wrote: > On Thu, 2015-10-22 at 12:37 -0700, Ethan A Merritt wrote: >> On Thursday, 22 October, 2015 20:47:37 Juhász Péter wrote: >>> On Thu, 2015-10-22 at 00:17 -0500, Daniel J Sebald wrote: >>>> >>>> Although it isn't a type of plot I'd use in my field, it would be a >>>> really nice feature given how common this type of geographical "plot" >>>> with data points is today. A command syntax is going to be the >>>> difficult part. Defining the maps is another issue. What if boundaries >>>> change? Is there some type of universally accepted data format or >>>> descriptive language for map boundaries these days? >>>> >>>> Dan >>>> >>> >>> Two more issues that count against including high-resolution map data >>> into gnuplot itself: >>> >>> - licensing >>> - data size >> >> You may be responding to a message I haven't seen yet, but... >> I don't think Dan's comment implied incorporating the map data itself >> into gnuplot. The idea, I think, is that if there are standard formats >> for map data we might provide support for these to make it easier to >> read from external files. Analogous to the way we handle image formats: >> plot 'foo.png' binary filetype=png >> >> I don't know whether this would be useful or not. The external files >> might require so much pre-processing that the syntax of the final plot >> command is not an issue. >> >> Ethan >> > > Well, he didn't imply that, however, the OP wanted a simple way to > produce geographical plots that include country borders. To do that > reliably, you have to have a proven, known dataset. What you are saying > (adding support for one or more of the de facto standard GIS formats) is > only halfway there - and even that raises the question of which > format(s) to support, and to what extent. > > IMHO that alone doesn't worth the effort, as it doesn't provide real > benefits compared to the situation that we have now, that is, if you > want to produce nice, detailed maps, you get the data from wherever you > can, in any format you can, you convert it with some external tools to a > format that gnuplot can use, then plot it yourself. > > We might turn to systems such as R for inspiration: there the creation > of maps is supported in the form of add-on packages, e.g. > https://cran.r-project.org/web/packages/maps/index.html > https://cran.r-project.org/web/packages/mapdata/index.html > > However, gnuplot does not support add-on packages like that and I think > that's a can of worms we don't want to open right now. There is an R manual associated with the package: https://cran.r-project.org/web/packages/maps/maps.pdf but I'm not going to take the time to read it right now. But this R package has gone all out as far as databases with intriguing names like "spacetime", etc. As I see it, gnuplot should bring the benefit of easily overlaying data on a geospatial map in order to convey statistical, survey, or other types of data. For example, someone may want to use the size of a dot (which gnuplot has) to illustrate the number of museums in major U.S. cities. Or perhaps the user wants to show registered voters by state using color variation to illustrate party affiliation. That sort of thing. I could imagine a special plot mode "geospatial" akin to something like "polar" that changes the underlying coordinate system to, say, latitude and longitude or whatever. Given a database, gnuplot might figure out the lat/long data or vector boundary data behind the scenes, making the task of plotting easy for the user. So it might be: (Data I'm making up...) set geospatial bigdatabasefile.esri plot '-' using 1:2 with filledcircles title "Museum Count" "Los Angeles" 123 "New York" 217 "Philadelphia" 132 "Chicago" 194 "Washington D.C." 732 end Dan |