<HTML>
<HEAD>
<TITLE>Re: [GRASS-user] ascii files to import</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
Kirk,<BR>
<BR>
<BR>
On 7/31/07 8:34 AM, &quot;Kirk Wythers&quot; &lt;kwythers@umn.edu&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
On Jul 31, 2007, at 9:47 AM, Michael Barton wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Kirk,<BR>
<BR>
Your method #1 is straightforward and should go fast. Do you need all 100<BR>
columns?<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
Thanks Michael. Yes, I am afraid that I need all 100, if only because I am not sure that I won't someday! <BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
A 3rd way is to make sure that the file has a column to serve as a<BR>
&quot;category/cat&quot; field (integer), save it as a dbf file from Excel and use<BR>
v.in.db to create the points. This has the advantage that you can name the<BR>
fields more easily. You would then need to reproject it into UTM. <BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
With this approach how would reproject to UTM? I assume you have read the dbf file into a lat lon location. Right? However, then I would need to move the data from the lat lon location to the UTM location.<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Use v.proj. This would be the case with any GRASS method. <BR>
<BR>
Start in latlon location, import points, switch to utm location (g.mapset or just exit and restart in utm location), reproject using v.proj.<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
I'd be a little nervous about trying to convert from latlon to UTM within a<BR>
database. GRASS has routines specially designed to do accurate reprojection.<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
This actually works pretty well using the PostGIS extensions on PostgrSQL (you can use db.connect to point grass to a pg database rather than the default dbf). There is a very useful tutorial written by </SPAN><FONT COLOR="#333333"><FONT SIZE="4"><SPAN STYLE='font-size:13.0px'>Regina Obe&acute;<BR>
<BR>
</SPAN></FONT></FONT><SPAN STYLE='font-size:12.0px'><a href="http://www.bostongis.com/?content_name=postgis_tut03#30">http://www.bostongis.com/?content_name=postgis_tut03#30</a><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I took a brief look at the tutorial. I may have missed it, but didn't see anything about where you would set the datum, ellipsoid, and zone for the UTM projection you want. The tutorial only mentions WGS84. These settings can make a significant difference. e.g., here in Arizona, the difference between using NAD27 and NAD83 can be over 200m, and can put a point on the wrong side of a road or canyon. If you have set up your UTM location correctly, GRASS and v.proj will take this kind of important information into account when setting new point coordinates. <BR>
<BR>
Michael<BR>
__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
Director of Graduate Studies<BR>
School of Human Evolution &amp; Social Change &nbsp;&nbsp;&nbsp;<BR>
Center for Social Dynamics &amp; Complexity<BR>
Arizona State University<BR>
<BR>
phone: 480-965-6213<BR>
fax: 480-965-7671<BR>
www: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a> <BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>