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 &lt;<a href="mailto:karin.meier-fleischer at zmaw.de">karin.meier-fleischer at zmaw.de</a>&gt; 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 &quot;ESRI Shapefile&quot; 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>
&#39;reinit&#39;<br>
&#39;open model.ctl&#39;<br>
&#39;set lon 4 17&#39;<br>
&#39;set lat 45 55&#39;<br>
&#39;set gxout shaded&#39;<br>
&#39;set csmooth on&#39;<br>
&#39;set mpdraw off&#39;<br>
&#39;d ts&#39;<br>
&#39;shp_polyf drainage/LAB&#39;<br>
&#39;printim test.gif white&#39;<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?&nbsp;</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>&nbsp;</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>&nbsp;&nbsp; &nbsp; <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>&nbsp;&nbsp;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