[GRASS5] data set of world countries unique centroids

Hello,

In order to map some of the results of the GRASS Users Survey, I am looking
for a worldwide set of unique centroids per country. In the current data sets
I have (all based on the ESRI world map) each country is represented by many
different polygons, each having its own centroid, but with the same country
name identifying it. Thus, when I try to use d.vect.chart I get as many
piecharts per country as there are polygons. I would obviously prefer to have
only one chart par country.

I know I can "clean" out the data sets I have, but if anyone has a ready-to-go
free data set of unique centroids per country (or can direct me to a possible
source), it would save me some work.

Moritz

While trying to do my work exclusively in 5.7 (and update/cleanup our modules at the same time)
I am running into various problems/questions etc., and I don't want to bother this (or users)
list with them, so apparently a tutorial "how to go from 5.* to 6.0"
would be helpful to minimze irrelevant bug reports, complaints about missing commands etc.
.
I found that Markus is already working on it in WIKI
http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassSixTutorial
- it took me some time to find it so it may be useful to include links to this document in
http://grass.itc.it/grass57/index.html
http://grass.itc.it/grass57/manuals/html57_user/index.html
http://grass.itc.it/grass57/tutorial/index.html
and any other place where people may go to look for it?
If it is OK, I can add the links.

Also, it would be extremely useful to have a table that will show which commands
were replaced by which, e.g.
   5.* 6.0 comments
g.projinfo g.proj -p merge of g.setproj and g.projinfo
s.surf.rst v.surf.rst merge of s.surf.rst and v.surf.rst, works now both for contours and point data
...

unless there is such table already. The best place would be probably in the GrassSixTutorial,
right after getting started - Markus, if you can set such table up, I will add as much as I will
find and I am sure others will be able to help too.

Helena

On Sun, December 12, 2004 3:57, Helena said:

Also, it would be extremely useful to have a table that will show which
commands
were replaced by which, e.g.
   5.* 6.0 comments
g.projinfo g.proj -p merge of g.setproj and g.projinfo
s.surf.rst v.surf.rst merge of s.surf.rst and v.surf.rst, works now
both for contours and point data
...

Have you looked at this:

http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/v.modules.html

And there is also:

http://grass.gdf-hannover.de/twiki/pub/GRASS/GrassToDoList/54to57porting_11-2004.txt

Both might be a base for what you are looking for...

Moritz

(cc Silke)

On Sat, Dec 11, 2004 at 05:53:29PM +0100, Moritz Lennert wrote:

Hello,

In order to map some of the results of the GRASS Users Survey, I am looking
for a worldwide set of unique centroids per country. In the current data sets
I have (all based on the ESRI world map) each country is represented by many
different polygons, each having its own centroid, but with the same country
name identifying it. Thus, when I try to use d.vect.chart I get as many
piecharts per country as there are polygons. I would obviously prefer to have
only one chart par country.

I know I can "clean" out the data sets I have, but if anyone has a ready-to-go
free data set of unique centroids per country (or can direct me to a possible
source), it would save me some work.

Please have a look at the worldmap based on VMAP0 data from
Silke Reimer/Intevation:

http://www.intevation.de/pipermail/freegis-list/2004-July/001784.html

ftp://ftp.gwdg.de/pub/misc/freegis/intevation/freegis/worlddata/

Note that she used VMAP0 R3 (a bit old) for V0.1.

There is a newer V0.2 also available, maybe based on a higher version
but the tarball seems to be damaged.

It's on my list to generate a world map based on VMAP R5 (latest).

Markus

On Sun, December 12, 2004 15:29, Markus Neteler said:

(cc Silke)

On Sat, Dec 11, 2004 at 05:53:29PM +0100, Moritz Lennert wrote:

Hello,

In order to map some of the results of the GRASS Users Survey, I am looking
for a worldwide set of unique centroids per country. In the current data
sets
I have (all based on the ESRI world map) each country is represented by many
different polygons, each having its own centroid, but with the same country
name identifying it. Thus, when I try to use d.vect.chart I get as many
piecharts per country as there are polygons. I would obviously prefer to
have
only one chart par country.

I know I can "clean" out the data sets I have, but if anyone has a
ready-to-go
free data set of unique centroids per country (or can direct me to a
possible
source), it would save me some work.

Please have a look at the worldmap based on VMAP0 data from
Silke Reimer/Intevation:

http://www.intevation.de/pipermail/freegis-list/2004-July/001784.html

ftp://ftp.gwdg.de/pub/misc/freegis/intevation/freegis/worlddata/

Note that she used VMAP0 R3 (a bit old) for V0.1.

There is a newer V0.2 also available, maybe based on a higher version
but the tarball seems to be damaged.

Thanks, I'd already tried with v0.2 but it presents the exact problem I've
mentioned. See
http://moritz.homelinux.org/grass_survey/results/survey_responses.png
for a demonstration of what I mean: more than one area with the same country
name.

I remember actually creating a "one country - one centroid" data set a few
years ago, I hopefully should be able to find it at work on Monday...otherwise
I'll have to digitize the necessary centroids myself. Not the end of the world
either.

Moritz

On Sat, Dec 11, 2004 at 09:57:36PM -0500, Helena wrote:

While trying to do my work exclusively in 5.7 (and update/cleanup our
modules at the same time)
I am running into various problems/questions etc., and I don't want to
bother this (or users)
list with them, so apparently a tutorial "how to go from 5.* to 6.0"
would be helpful to minimze irrelevant bug reports, complaints about
missing commands etc.
.
I found that Markus is already working on it in WIKI
http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassSixTutorial
- it took me some time to find it so it may be useful to include links to
this document in

It is not advertised too much yet as I first want to migrate the
old 5.7 tutorial completely to the WIKI, then delete the old
tutorial.

http://grass.itc.it/grass57/index.html
http://grass.itc.it/grass57/manuals/html57_user/index.html
http://grass.itc.it/grass57/tutorial/index.html
and any other place where people may go to look for it?
If it is OK, I can add the links.

Probably I should first delete the old tutorial, link the
new one and then (later) extend the new WIKI tutorial?

Also, it would be extremely useful to have a table that will show which
commands
were replaced by which, e.g.
  5.* 6.0 comments
g.projinfo g.proj -p merge of g.setproj and g.projinfo
s.surf.rst v.surf.rst merge of s.surf.rst and v.surf.rst, works now
both for contours and point data
...

unless there is such table already. The best place would be probably in the
GrassSixTutorial,
right after getting started - Markus, if you can set such table up, I will
add as much as I will find and I am sure others will be able to help too.

Yes, such a table is desired.
Note that here relevant stuff is already available:

http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/v.modules.html

This table (in 5.7 CVS: doc/vector/v.modules.html ) may be just extended,
I guess..

But: I am currently absolutely out of time.
Since the WIKI is writable to non programmers, this is a nice job
for another contributor.

Markus

Helena,

I made this kind of cross-list when I was building the menu system for GRASS
5.7 to make sure I knew which commands to include and not include. I just
looked for it on my PowerBook and couldn't find it. I may have ditched it
when I finished, but I will look on the office computer and see if I can
find it there.

Michael

On 12/11/04 7:57 PM, "Helena" <hmitaso@unity.ncsu.edu> wrote:

Also, it would be extremely useful to have a table that will show which
commands
were replaced by which, e.g.
   5.* 6.0 comments
g.projinfo g.proj -p merge of g.setproj and g.projinfo
s.surf.rst v.surf.rst merge of s.surf.rst and v.surf.rst, works now
both for contours and point data
...

unless there is such table already. The best place would be probably in the
GrassSixTutorial,
right after getting started - Markus, if you can set such table up, I will add
as much as I will
find and I am sure others will be able to help too.

Helena

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

> I found that Markus is already working on it in WIKI
> http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassSixTutorial
> - it took me some time to find it so it may be useful to include
> links to this document in

It is not advertised too much yet as I first want to migrate the
old 5.7 tutorial completely to the WIKI, then delete the old
tutorial.

> http://grass.itc.it/grass57/index.html
> http://grass.itc.it/grass57/manuals/html57_user/index.html
> http://grass.itc.it/grass57/tutorial/index.html
> and any other place where people may go to look for it?
> If it is OK, I can add the links.

Probably I should first delete the old tutorial, link the
new one and then (later) extend the new WIKI tutorial?

please, no. better to put a big link to the wiki at the start of the old
tutorial with a big "obsolete" tag.

Hamish

Moritz Lennert wrote:

On Sun, December 12, 2004 3:57, Helena said:

Also, it would be extremely useful to have a table that will show which
commands
were replaced by which, e.g.
  5.* 6.0 comments
g.projinfo g.proj -p merge of g.setproj and g.projinfo
s.surf.rst v.surf.rst merge of s.surf.rst and v.surf.rst, works now
both for contours and point data
...

Have you looked at this:

http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/v.modules.html

And there is also:

http://grass.gdf-hannover.de/twiki/pub/GRASS/GrassToDoList/54to57porting_11-2004.txt

Both might be a base for what you are looking for...

Moritz

Thank you all for the feedback - I have seen the above files some time ago but I have completely
forgotten about them - that is almost done what I had in mind, it just needs to be updated
and linked to the proper places (GrassSixTutorial?)

Markus, you may add a hint to 5.* users migrating to 5.7 to add pts or site suffix
to the names of their site files - actually it may be useful to add it in v.in.sites.all
because people may have sites and vector files with the same names (as I do)
and if v.in.sites.all and v.in.convert.all are both run the files will be overwritten.

Helena

On Sun, Dec 12, 2004 at 09:50:38PM -0500, Helena wrote:
...

Markus, you may add a hint to 5.* users migrating to 5.7 to add pts or site
suffix
to the names of their site files - actually it may be useful to add it in
v.in.sites.all
because people may have sites and vector files with the same names (as I do)
and if v.in.sites.all and v.in.convert.all are both run the files will be
overwritten.

Good idea, done in CVS.

v.in.sites.all -r
Processing jr12april02.3d -> jr12april02_3d_points
Input format: dimension: 3 strings: 1 FP:0
...

Still the memory problem persists (still hoping for benchmarks
as suggested by Radim).

Markus

On Sun, Dec 12, 2004 at 03:29:17PM +0100, Markus Neteler wrote:

(cc Silke)

On Sat, Dec 11, 2004 at 05:53:29PM +0100, Moritz Lennert wrote:
> Hello,
>
> In order to map some of the results of the GRASS Users Survey, I am looking
> for a worldwide set of unique centroids per country. In the current data sets
> I have (all based on the ESRI world map) each country is represented by many
> different polygons, each having its own centroid, but with the same country
> name identifying it. Thus, when I try to use d.vect.chart I get as many
> piecharts per country as there are polygons. I would obviously prefer to have
> only one chart par country.
>
> I know I can "clean" out the data sets I have, but if anyone has a ready-to-go
> free data set of unique centroids per country (or can direct me to a possible
> source), it would save me some work.

Please have a look at the worldmap based on VMAP0 data from
Silke Reimer/Intevation:

http://www.intevation.de/pipermail/freegis-list/2004-July/001784.html

ftp://ftp.gwdg.de/pub/misc/freegis/intevation/freegis/worlddata/

Note that she used VMAP0 R3 (a bit old) for V0.1.

There is a newer V0.2 also available, maybe based on a higher version
but the tarball seems to be damaged.

Correction: the tarball is not damaged.

The README of freegis_worlddata-0.2 states:
  "These sample geodata have been extracted from VMAP Level0 R3"

Markus

Jaro Hofierka wrote:

Hi,

I did some tests of reading point data in grass5.7 (500K points).
I looks like the only problem is in reading 2D point data with attributes (everytime I had to kill the process).
However, reading 3D points in v.surf.rst is OK - it took around 10 secs
to get them loaded. So finally we've got the solution at least partially.
However, it is a bit complicated to produce 3D file from 2D site files
because they must be converted (e.g. by awk to 3D format) and then
can be imported as a 3D file using v.in.sites. The switch to force 3D import would help a lot.
Another interesting fact is that v.surf.idw is reading 2D point data with attributes quite fast, however, it uses old site input functions. I guess the vectors are read by some internal grass57 function that is invoked by those site input functions.
Maybe this function could be implemented in v.surf.rst as well. It would solve our problem with 2D point data.

>

(dbf) v.surf.rst input=dmr100 elev=dmr100 (killed after 20 minutes)
2.86user 1.05system 20:02.44elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (705major+47732minor)pagefaults 0swaps

!!!
This was optimised in grass51/lib/rst/interp_float/vinput2d.c
in August (1.4) but the optimisation was simply reverted in 1.8 which was obviously based on CVS older then 1.4!!!

You cannot simply replace a file in CVS with your modified OLD version!!!

I have reverted vinput2d.c to 1.7.

Please check ALL the changes you have done! If your code was too old and if you have overwritten the previous changes, please revert and submit only your changes done in fresh CVS!!!

I am tired.

Radim

PS: On 10000 points this reduce the time from 1.344s to 0.093s