[GRASSLIST:9270] Re: mapping the output of a population model

Luigi Ponti lponti at infinito.it
Thu Dec 1 17:33:41 EST 2005


Yes, that was it! Placing the legend on the screen using screen 
coordinates worked, as the legend displayed correctly in the .png file.

I am now trying to import a shapefile (with .dbf and .shx dependencies 
in the same folder). It contains a Reference EvapoTranspiration Zones 
Map for California that I have obtained by contacting California 
Irrigation Management Information System (CIMIS) 
<http://wwwcimis.water.ca.gov/>. I am using v.in.ogr to import the 
shapefile to a latlong location by overriding the projection because I 
don't know anything about it.
This is the shell output I get:

[output starts]

GRASS 6.1.cvs (latlong):~ > v.in.ogr 
dsn=/home/Administrator/GISBASE/CIMIS/ outp
ut=eto3 layer=eto_utm10_nad27 min_area=0.0001 snap=-1 -o
Over-riding projection check.
Proceeding with import...
Layer: eto_utm10_nad27
WARNING: Area size 0.0e+00, area not imported.

... omissis ... (about 40 lines of the same warning: "WARNING: Area size 
0.0e+00, area not imported.")

WARNING: Area size 0.0e+00, area not imported.
-----------------------------------------------------
Building topology ...
344 primitives registered     
Building areas:  100%
342 areas built     
339 isles built
Attaching islands:  100%
Attaching centroids:  100%
Topology was built.
Number of nodes     :   341
Number of primitives:   344
Number of points    :   0
Number of lines     :   0
Number of boundaries:   344
Number of centroids :   0
Number of areas     :   342
Number of isles     :   339
Number of incorrect boundaries   :   4
Number of areas without centroid :   342
-----------------------------------------------------
WARNING: Cleaning polygons, result is not guaranteed!
Building topology ...
Topology was built.
Number of nodes     :   341
Number of primitives:   344
Number of points    :   0
Number of lines     :   0
Number of boundaries:   344
Number of centroids :   0
Number of areas     :   -
Number of isles     :   -
-----------------------------------------------------
Break polygons:
Registering points ... 3372
All points (vertices):  4245
Registered points (unique coordinates):  3372
Points marked for break:   450
Breaks:   512
-----------------------------------------------------
Remove duplicates:
Duplicates:   133
-----------------------------------------------------
Break boundaries:
Intersections:     0                        
-----------------------------------------------------
Remove duplicates:
Duplicates:     0
-----------------------------------------------------
Clean boundaries at nodes:
Modifications:     0
-----------------------------------------------------
Change dangles to lines:
Removed dangles:     0  removed lines:     0
-----------------------------------------------------
Remove bridges:
Removed bridges:     0  removed lines:     0
-----------------------------------------------------
Building topology ...
Building areas:  100%
353 areas built     
216 isles built
Attaching islands:  100%
Topology was built.
Number of nodes     :   451
Number of primitives:   857
Number of points    :   0
Number of lines     :   0
Number of boundaries:   857
Number of centroids :   0
Number of areas     :   353
Number of isles     :   216
Number of areas without centroid :   353
Layer: eto_utm10_nad27
-----------------------------------------------------
-----------------------------------------------------
Building topology ...
931 primitives registered     
Building areas:  100%
353 areas built     
216 isles built
Attaching islands:  100%
Attaching centroids:  100%
Topology was built.
Number of nodes     :   794
Number of primitives:   931
Number of points    :   0
Number of lines     :   0
Number of boundaries:   587
Number of centroids :   344
Number of areas     :   353
Number of isles     :   216
Number of areas without centroid :   9
-----------------------------------------------------
392 input polygons
total area: 2.689311e+16 (353 areas)
overlapping area: 0.000000e+00 (0 areas)
area without category: 1.036357e+15 (9 areas)

[output ends]

After importing the vector, it is not possible to display it ("The 
bounding box of the map outside current region, nothing displayed.") or 
even to g.remove it. However, when I try to open it with QGIS, it 
displays with no problem and gives the following "Layer Spatial 
Reference System": +proj=longlat +ellps=WGS84 +no_defs.

I also tried to import the vector to a location with "utm10_nad27"-like 
projection, as the name of the file would suggest. In this case, GRASS 
complains about a coor file which is too big.

If anybody has suggestions, please let me know.

Thanks,

Luigi



Ian MacMillan wrote:

> Luigi, I think that I have seen on this list that you need to place 
> your legend without using the mouse.  Maybe you could place it on the 
> screen using screen coordinates or map coordinates instead?
>
> G'luck
> -Ian
>
>
>
> On Nov 29, 2005, at 1:11 PM, Luigi Ponti wrote:
>
>> Thanks Ian,
>>
>> I used it and it worked very well. I also used only the r.mapcalc to 
>> clip instead of MASK, so as to clip just one layer and not the entire 
>> display.
>>
>> I would like to ask if somebody knows the reason why when saving a 
>> display to a .png file with d.out.png, the legend produced via 
>> d.legend does not show up in the saved .png image.
>>
>> As a side note, I would like to thank again the mailing: my mapping 
>> task is pretty much accomplished.
>>
>> Luigi
>>
>> Ian MacMillan wrote:
>>




More information about the grass-user mailing list