Is e.g. ksnapshot the best way to save a d.3d image for presentation
on a web page? (save, then edit it with gimp); as not as many
facilities for saving are available as are for usual raster files.
--
http://jidanni.org/ Taiwan(04)25854780
Dan Jacobson wrote:
Is e.g. ksnapshot the best way to save a d.3d image for presentation
on a web page? (save, then edit it with gimp); as not as many
facilities for saving are available as are for usual raster files.
The simplest way to generate images from d.* commands is to use the
PNG driver. If you already have the data displayed on another monitor,
you can use d.save to obtain a script which will re-create the
display.
For the best results, use GD 2.x, as this supports 24-bpp images.
Unfortunately, the Makefile which is supplied with GD 2.x is rather
crude; at a minimum, you need to change the line:
LINK_SHARED_HEAD=ld -shared
to:
LINK_SHARED_HEAD=ld -shared -soname libgd.so.2
Otherwise, programs which are linked against the library will use the
first version of libgd which they find, which may not be the right
one.
BTW, you also need to use e.g.
GRASS_TRUECOLOR=TRUE
export GRASS_TRUECOLOR
before starting the driver.
--
Glynn Clements <glynn.clements@virgin.net>
I downloaded the following .E00 (ESRI export) files from
http://www.gisdatadepot.com/. These files are for one
country and are derived from the Digital Chart of the World.
AEPOINT.E00 DNNET.E00 HSPOINT.E00 LCPOINT.E00 PPPOINT.E00
RRLINE.E00 CLLINE.E00 DSPOINT.E00 HYNET.E00 LCPOLY.E00
PPPOLY.E00 TSLINE.E00 CLPOINT.E00 HSLINE.E00 HYPOINT.E00
PONET.E00 RDLINE.E00 UTLINE.E00
I have used m.in.e00 to import the data to GRASS. I can
display the line and poly files with d.vect and the point
files with d.sites. However, the labels and categories that
were in the .E00 files have in some cases (the point data
files, I think) detached from the data. For example,
site_lists/aepoint contains the coordinates of airports and
dig_cats/aepoint.aeptname contains the names of airports,
but the categories in the site_lists file do not seem to
match the categories in the dig_cats file. Is there any way
to reunite the labels and the GIS data?
Thank you very much.
Best regards,
Michael
In case anyone is interested, I think that I have resolved
this question:
I downloaded the following .E00 (ESRI export) files from
http://www.gisdatadepot.com/. These files are for one
country and are derived from the Digital Chart of the World.AEPOINT.E00 DNNET.E00 HSPOINT.E00 LCPOINT.E00 PPPOINT.E00
RRLINE.E00 CLLINE.E00 DSPOINT.E00 HYNET.E00 LCPOLY.E00
PPPOLY.E00 TSLINE.E00 CLPOINT.E00 HSLINE.E00 HYPOINT.E00
PONET.E00 RDLINE.E00 UTLINE.E00I have used m.in.e00 to import the data to GRASS. I can
display the line and poly files with d.vect and the point
files with d.sites. However, the labels and categories that
were in the .E00 files have in some cases (the point data
files, I think) detached from the data. For example,
site_lists/aepoint contains the coordinates of airports and
dig_cats/aepoint.aeptname contains the names of airports,
but the categories in the site_lists file do not seem to
match the categories in the dig_cats file. Is there any way
to reunite the labels and the GIS data?
I will use the example of aepoint (airport locations) and I
will attach the airport names. m.in.e00 brings in aepoint
as a site file but also creates the dig_cats/aepoint.aeptname category file.
The site_lists/aepoint site file includes coordinates
(longitude and latitude) and a numeric category code for
each airport.
The dig_cats/aepoint.aeptname category file contains the
numeric category codes and the airport name.
1) Use s.to.vect to convert the site file to a vector file.
Do NOT name the new vector file the same name as the already
existing dig_cats/aepoint.aeptname category file because
s.to.vect will overwrite the desired dig_cats/aepoint.aeptname file.
You CAN name the new vector file aepoint.
2) Rename using cp or mv (unix) or Explorer (windows)
only and all of the following files:
dig/aepoint to dig/aepoint.aeptname
dig_att/aepoint to dig_att/aepoint.aeptname
dig_plus/aepoint to dig_plus/aepoint.aeptname
Do NOT rename dig_cats/aepoint to dig_cats/aepoint.aeptname
because the already existing dig_cats/aepoint.aeptname
contains the desired labels.
Do NOT use g.rename or g.copy for this procedure because it
will overwrite the already existing dig_cats/aepoint.aeptname
3) Now you can display the airports and their names with
d.vect aepoint.aeptname
d.vect.labels aepoint.aeptname
4) It is also possible to convert the vector file back to a
site file with v.to.sites using the -C option to use TEXT
data (the airport name) instead of attribute as the site
description.
Best regards,
Michael
I have downloaded boundary files from the U.S. Bureau of the
Census (http://www.census.gov/geo/www/cob/) in .e00 format.
For example st99_d00.e00 is the complete state boundaries
for the U.S. for 2000. When I import the file with
m.in.e00, d.vect shows a map of the United States but the
raster file produced by v.to.rast has holes, specifically
Texas and Massachusetts.
Perhaps the vector areas are not closed for those states?
How is it possible in GRASS to close the vector areas if
that is indeed the problem?
Is it strange that the usually meticuluous U.S. Bureau of
the Census has posted boundary files with incomplete areas?
Best regards,
Michael Ash, Assistant Professor
of Economics and Public Policy
Department of Economics and CPPA
University of Massachusetts
Amherst, MA 01003
Tel 413-545-6329 Fax 413-545-2921
Email mash@econs.umass.edu
http://www-unix.oit.umass.edu/~maash
Michael Ash wrote:
I have downloaded boundary files from the U.S. Bureau of the
Census (http://www.census.gov/geo/www/cob/) in .e00 format.
For example st99_d00.e00 is the complete state boundaries
for the U.S. for 2000. When I import the file with
m.in.e00, d.vect shows a map of the United States but the
raster file produced by v.to.rast has holes, specifically
Texas and Massachusetts.Perhaps the vector areas are not closed for those states?
How is it possible in GRASS to close the vector areas if
that is indeed the problem?
use v.digit. But it may also be the lack of a label point
inside the polygon (verify wether v.support shows errors or not
when running on your vector file). This can also be corrected with
v.digit.
--
Michel Wurtz
Michael Ash wrote:
In case anyone is interested, I think that I have resolved
this question:files with d.sites. However, the labels and categories that
were in the .E00 files have in some cases (the point data
files, I think) detached from the data. For example,
site_lists/aepoint contains the coordinates of airports and
dig_cats/aepoint.aeptname contains the names of airports,
but the categories in the site_lists file do not seem to
match the categories in the dig_cats file. Is there any way
to reunite the labels and the GIS data?
Well, you find the way. But in reality, its a known bug in
m.in.e00 : e00 point files are created as site file, but since
attributes are written before coordinates, they are not added
in site file. I will correct this, ahemm, as soon as I will
have time
--
Michel Wurtz
On Monday 18 November 2002 12:17 am, Michel Wurtz wrote:
Michael Ash wrote:
> I have downloaded boundary files from the U.S. Bureau of the
> Census (http://www.census.gov/geo/www/cob/) in .e00 format.
> For example st99_d00.e00 is the complete state boundaries
> for the U.S. for 2000. When I import the file with
> m.in.e00, d.vect shows a map of the United States but the
> raster file produced by v.to.rast has holes, specifically
> Texas and Massachusetts.
>
> Perhaps the vector areas are not closed for those states?
>
> How is it possible in GRASS to close the vector areas if
> that is indeed the problem?use v.digit. But it may also be the lack of a label point
inside the polygon (verify wether v.support shows errors or not
when running on your vector file). This can also be corrected with
v.digit.
Try to click on that areas with d.what.vect, you can get:
1) no area -> unclosed areas
2) area not labeled -> missing category
3) labeled area -> strange
Are you sure that attributes imported from e00 were integers > 0?
As cats < 1 are not valid, such records are deleted from dig_att
by v.support.
Radim
Try to click on that areas with d.what.vect, you can get:
1) no area -> unclosed areas
2) area not labeled -> missing category
3) labeled area -> strange
Using d.what.vect and moving due east from northern New
Mexico, U.S.A., I find New Mexico, Nothing where Texas
Should Be, and Oklahoma:
103:21W(E) 35:46:30N(N)
st99_d00.name in mash Area - Category 192 New Mexico
Size - Sq Meters: 1000865258519.582 Hectares: 100086525.852
Acres: 247313185.009 Sq Miles: 386426.8516
101:26:15W(E) 35:33N(N)
st99_d00.name in mash Nothing Found.
97:09:45W(E) 35:39:45N(N)
st99_d00.name in mash Area - Category 191 Oklahoma
Size - Sq Meters: 2210586840632.636 Hectares: 221058684.063
Acres: 546234638.122 Sq Miles: 853491.6221
I think that the problem is an unclosed area.
Are you sure that attributes imported from e00 were integers > 0?
As cats < 1 are not valid, such records are deleted from dig_att
by v.support.
The dig_att/ file looks perefectly fine and includes lines
with attributes that correspond to Texas in the dig_cats/
file.
Best,
Michael
--
Michael Ash, Assistant Professor
of Economics and Public Policy
Department of Economics and CPPA
University of Massachusetts
Amherst, MA 01003
Tel 413-545-6329 Fax 413-545-2921
Email mash@econs.umass.edu
http://www-unix.oit.umass.edu/~maash
Michael Ash wrote:
> I have downloaded boundary files from the U.S. Bureau of the
> Census (http://www.census.gov/geo/www/cob/) in .e00 format.
> For example st99_d00.e00 is the complete state boundaries
> for the U.S. for 2000. When I import the file with
> m.in.e00, d.vect shows a map of the United States but the
> raster file produced by v.to.rast has holes, specifically
> Texas and Massachusetts.
>
> Perhaps the vector areas are not closed for those states?
>
> How is it possible in GRASS to close the vector areas if
> that is indeed the problem?use v.digit. But it may also be the lack of a label point
inside the polygon (verify wether v.support shows errors or not
when running on your vector file). This can also be corrected with
v.digit.
Thank you for the quick response. I had been hoping for a
royal road, but there seems to be no easy way.
On Monday 18 November 2002 10:44 pm, Michael Ash wrote:
Using d.what.vect and moving due east from northern New
Mexico, U.S.A., I find New Mexico, Nothing where Texas
Should Be, and Oklahoma:
...
I think that the problem is an unclosed area.
I was curious where the problem is and I found dangle on the boundary:
http://mpa.itc.it/radim/texas.png
For next occasions and others:
m.in.e00 input=st99_d00.e00 action=vector
v.support -r map=st99_d00 err=err
v.out.ascii input=err output=err
dig_ascii/err:
A 2
26.25857424 -98.6253
26.25219177 -98.6253
and it is also in st99_d00.e00:
2094 12234 2039 2040 196 196 2
-9.86252999999997E+01 2.62585742374075E+01
-9.86252999999975E+01 2.62521917668542E+01
so the problem is in st99_d00.e00. I think that such dangles are
allowed in Arc/Info, but as it is not present in st99_d00.shp.
I consider it to be an error in data. You can write to census.gov.
Solution:
v.rm.dangles input=st99_d00 output=us
cp dig_att/st99_d00 dig_att/us
cp dig_cats/st99_d00.name dig_cats/us
v.support -r map=us
d.what.vect ->
-98.94589247(E) 32.37349011(N)
us in us Area - Category 196 Texas
Radim
The precompiled binary of WinGRASS for the xserver is pre3, while the precompiled binary for generic is the release 5.0.0.
On balance, I prefer the xserver flavor (more stable, sharper graphics on my computer, can issue command and see the monitors at the same time),
BUT the program d.vect.area appears in 5.0.0 but not in pre3.
1. Is it possible/safe to mix and match, i.e., to install pre3 for the xserver but to use the d.vect.area program from 5.0.0?
2. Is there a precompiled binary of WinGRASS 5.0.0 for the xserver available on the net? (I didn't see it at the mirror sites.)
Best regards,
Michael Ash
Hi Michael.
1. Is it possible/safe to mix and match, i.e., to install pre3 for the
xserver but to use the d.vect.area program from 5.0.0?
If d.vect.area is not a display program it might be OK - try it.
2. Is there a precompiled binary of WinGRASS 5.0.0 for the xserver
available on the net? (I didn't see it at the mirror sites.)
As far as I know - no.
Cheers
Mike Thomas.
Hi Mike's,
Some time ago I had told Markus that I thought I would have some time to
finish testing my compile of Grass 5.0.0 for X Server on Cygwin and
upload it for distribution from the grass sites. Unfortunately, things
got busier instead of easing off. (Well, unfortunately for other
WinGrass users, but for me that's good, since I get paid when I work.)
Anyway, things seem to be leveling off again, so I'll try to fit some
time in for grass testing, and to get the few problems I found ironed
out. All of the core programs seemed to be working, but I still need to
spend time trying a number of different things out.
If you want, I can let you know when I have uploaded (assuming no
surprises from my current projects that should be in 3-5 days - well,
lets say a week to be safe).
Cheers,
Malcolm Blue
-----Original Message-----
From: owner-GRASSLIST@baylor.edu
[mailto:owner-GRASSLIST@baylor.edu] On Behalf Of Mike Thomas
Sent: December 12, 2002 2:30 AM
To: Michael Ash; GRASSLIST@baylor.edu
Subject: [GRASSLIST:5218] Re: WinGRASS pre3 and 5.0.0Hi Michael.
> 1. Is it possible/safe to mix and match, i.e., to install
pre3 for the
xserver but to use the d.vect.area program from 5.0.0?If d.vect.area is not a display program it might be OK - try it.
> 2. Is there a precompiled binary of WinGRASS 5.0.0 for the xserver
available on the net? (I didn't see it at the mirror sites.)As far as I know - no.
Cheers
Mike Thomas.