No subject
Wed Apr 14 09:37:02 EDT 2010
previous posting, not all shapefiles can be plotted with shp_polyf because
the data itself is not organized as closed polygons. Have you tried using
shp_lines? Graziano may have other suggestions...
Arlindo
--
Arlindo da Silva
dasilva at alum.mit.edu
------=_Part_23298_4190303.1213274707745
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<div class="gmail_quote">On Tue, Jun 10, 2008 at 4:49 AM, Karin Meier-Fleischer <<a href="mailto:karin.meier-fleischer at zmaw.de">karin.meier-fleischer at zmaw.de</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I have downloaded files from <a href="http://www.maproom.psu.edu/dcw/" target="_blank">http://www.maproom.psu.edu/dcw/</a> and have<br>
problems to display it with grads.<br>
<br>
For example, I downloaded the tar file 451.tar for Germany drainage, which<br>
contains ArcView data. I converted the data to shapefile using ogr2ogr:<br>
<br>
ogr2ogr -f "ESRI Shapefile" drainage dnpoint.e00<br>
<br>
Now, I have the directory drainage which contains the following files<br>
<br>
LAB.dbf<br>
LAB.prj<br>
LAB.shp<br>
LAB.shx<br>
<br>
When running the grads script only the data variable ts is plotted<br>
but the drainage shapefile data not:<br>
<br>
'reinit'<br>
'open model.ctl'<br>
'set lon 4 17'<br>
'set lat 45 55'<br>
'set gxout shaded'<br>
'set csmooth on'<br>
'set mpdraw off'<br>
'd ts'<br>
'shp_polyf drainage/LAB'<br>
'printim test.gif white'<br>
<br>
Any idea?<br>
<br>
In the shape extensions documentation an object could be given to the<br>
call of shp_lines and shp_polyf:<br>
<br>
shp_lines SHAPEFILE [OBJECT]<br>
shp_polyf SHAPEFILE [OBJECT]<br>
<br>
What is the meaning of OBJECT? </blockquote><div><br></div><div>A shapefile consists of a collection of OBJECTS, think of like like it were records. If you just enter the file name than all objects in the file are plotted. If you specify an object than only polygons for a smaller areas will be plotted. It is just a device for plotting portions of a file.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Perhaps I misunderstand the handling with shapefiles within grads?!....<br></blockquote><div><br></div><div><br></div><div>The shapelib C library is used to read the shapefiles:</div><div><br></div><div> <a href="http://shapelib.maptools.org/">http://shapelib.maptools.org/</a><br>
</div></div><div><br></div><div>From there lines or filled polygons are plotted. As Graziano mentioned in a previous posting, not all shapefiles can be plotted with shp_polyf because the data itself is not organized as closed polygons. Have you tried using shp_lines? Graziano may have other suggestions...</div>
<div><br></div><div> Arlindo</div><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva at alum.mit.edu">dasilva at alum.mit.edu</a>
------=_Part_23298_4190303.1213274707745--
More information about the gradsusr
mailing list