<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
I've committed the fix below suggested by Glynn. I tested it on the new NC demo data set and it causes no problems. <div><br class="webkit-block-placeholder"></div><div>Of course, the old regexp statement worked too in my tests. Since I'm so abysmal at regexp, I just have to go with this, like I did with the old statement (someone else suggested it to fix an earlier problem with latlon regions).<div><br class="webkit-block-placeholder"></div><div>Could someone please test this since I'm not completely clear what breaks the old algorithm that works with this one? Hopefully this will work with all projections this time.</div><div><br class="webkit-block-placeholder"></div><div>Michael<br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">____________________</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">C. Michael Barton, Professor of Anthropology</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Director of Graduate Studies</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">School of Human Evolution & Social Change</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Center for Social Dynamics & Complexity</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Arizona State University</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Phone: 480-965-6262</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Fax: 480-965-7671</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">www: <<a href="http://www.public.asu.edu/~cmbarton">www.public.asu.edu/~cmbarton</a>></font></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"> </div><br><div><div>On Dec 27, 2007, at 6:38 AM, <a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite"><p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Probably related to this in mapcanvas.tcl:</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><span class="Apple-converted-space"> </span># Finally put this into wind file format to use with GRASS_REGION</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><span class="Apple-converted-space"> </span>regexp -nocase {^.* (\(.*\))} $parts(projection) trash end</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><span class="Apple-converted-space"> </span>set parts(projection) [string trim $parts(projection) $end]</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">The "*" operator will try to match as much as possble, so matching the</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">string "99 (Polyconic (American))" against the regexp"^.* (\(.*\))"</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">will result in the ".*" matching ""99 (Polyconic " and the "(\(.*\))"</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">matching "(American))", so "end" will be set to "American)"</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Also, using "string trim" here is bogus; it discards any leading or</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">trailing section consisting of characters in the specified string,</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">which may be more than just the string itself (if $end contains the</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">digit 9, it will strip the projection code).</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">It should probably just match the portion that it wants, e.g.:</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><span class="Apple-converted-space"> </span>regexp -nocase {^([0-9]+)} $parts(projection) trash parts(projection)</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">rather than trying to match and discard the portion that it doesn't</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">want.</font></p> <p style="margin: 0.0px 0.0px 0.0px 10.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p> </blockquote></blockquote></div><br></div></div></body></html>