<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 7. juli. 2008, at 19.19, Dane Springmeyer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Kjell,<div>...</div><div><div>You are not alone. Projected coordinate systems can confuse beginners and experts alike.</div></div></div></blockquote><div><br></div><div>:-)</div><div><br></div><div>Well, given my completely newbie status as a GIS/Geodata user, I am very grateful for your patience, explaining these things to me.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">My understanding is that you have gps data and you are not sure what coordinate system it is in. You ran Matt Perry's script to convert the text-based coordinates into a shapefile format, but you still need to assign a coordinate system. </span></div></div></div></blockquote><div><br></div><div>I understand. WGS84 and UTM <span class="Apple-style-span" style="font-family: arial; font-size: 13px; ">32V worked fine for the data from Norway.</span></div><div><font class="Apple-style-span" face="arial" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>...</div><div>First, you only need to assign the projection AFTER you run the txt2shp.py script.</div></div></div></div></blockquote><div><br></div>OK. I understand.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>...</div><div>Second, I can see now (from your image links) that your data was collected in Lebanon, which means that the link I directed you to will not provide a reference to the correct UTM zone.</div><div><br></div><div>There are two possible UTM zones for Lebanon: UTM 36N or UTM 37N.</div><div><br></div><div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 16px; ">WGS 84 / UTM zone 36N</span></div><div><a href="http://spatialreference.org/ref/epsg/32636/">http://spatialreference.org/ref/epsg/32636/</a></div><div><br></div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 16px; ">WGS 84 / UTM zone 37N</span></div><div><a href="http://spatialreference.org/ref/epsg/32637/">http://spatialreference.org/ref/epsg/32637/</a></div></div></div></div></div></blockquote><div><br></div><div>36N seemed to have done thr trick:</div><div><font class="Apple-style-span" face="arial" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="font-family: Times; font-size: 16px; "><pre style="word-wrap: break-word; white-space: pre-wrap; "><font class="Apple-style-span" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px;">PROJCS["WGS_1984_UTM_Zone_36N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]</span></font></pre></span></span></font></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">You can check for yourself by downloading a world borders shapefile (<a href="http://thematicmapping.org/downloads/world_borders.php">http://thematicmapping.org/downloads/world_borders.php</a>) and a world UTM zone shapefile (<a href="http://earth-info.nga.mil/GandG/coordsys/gislayers/zips/mgrs6x8.zip">http://earth-info.nga.mil/GandG/coordsys/gislayers/zips/mgrs6x8.zip</a>), both in the WGS 84/EPSG 4326 coordinate system.</span></div></div><div><br></div><div>If you have more GPS data from other countries I highly recommend getting familiar with UTM zones.</div></div></div></div></blockquote><div><br></div><div>No. Only have data from Norway and Lebanon so far, but looking more closely into UTM seems like a good idea, especially in order to to get to grips with paper maps.</div><div><br></div><div><a href="http://www.ia-stud.hiof.no/~kjellare/misc/lebanon_wgs84_UTM36N.png">http://www.ia-stud.hiof.no/~kjellare/misc/lebanon_wgs84_UTM36N.png</a></div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>...</div><div>If you try to load data in different coordinate systems into the same QGIS project, QGIS will not (by default) make an effort to 'reproject-on-the-fly' when rendering, unless you explicitly set the Qgis project to do so. So even if you assign the correct UTM zone to your points, if you open them in Qgis along with a base layer in WGS 84 projection, they will not line up. You need to go to SETTINGS > PROJECT PROPERTIES > PROJECTION > ENABLE ON THE FLY PROJECTION.</div></div></div></div></blockquote><div><br></div><div>I figured that out, playing around with the Projection settings.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Or use the command line program ogr2ogr to reproject your shapefile to WGS84/EPSG 4326 from your assumed UTM projection. That command would look like:</span></div><div><br></div><div>$ ogr2ogr -s_srs EPSG:32636 -t_srs EPSG:4326 lebanon_points_wgs84.shp lebanon_points_utm36N.shp</div></div></div></div></blockquote><div><br></div><div>Splendid. I will have a go at that. </div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Then, if the assumed source projection was correct, your new shapefile should line up with other data in WGS 84.</span></div></div></div></div></blockquote><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">...</span></div>Yes, they are GUI applications... but don't you just need to automate the processing of your GPS data? </div></div></div></blockquote><div><br></div><div>No. In addition to use a unix shell-script to harvest and prepare geodata from my images using exiftool and some basic text formatting commands in unix, I also need to prepare the necessary shapefiles and hopefully find some way of (using shell-scripts) atomatically export png files to make up the map. </div><div><br></div><div>A quick sketch (using a screengrabbed OpenStreetMap) here:</div><div><a href="http://www.ia-stud.hiof.no/~kjellare/misc/programming_goal.png">http://www.ia-stud.hiof.no/~kjellare/misc/programming_goal.png</a></div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>If you want to create one PNG raster then QGIS or uDIG are the ideal tools to layout your png map. Just open all your shapefiles (you can even merge them all into one shapefile with ogr2ogr), label them, then zoom to each group and export a PNG file....</div><div><br></div><div>If you truly want to automate the creation of *many* PNG graphics then you'll need to look into scripting a mapping toolkit like Mapserver or Mapnik.</div></div></div></blockquote><div><br></div><div>Ouch. I see now that what looked like a way out of this (shp2img) is not accepting a shapefile as a input.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Dane</span></div></div></div></blockquote><br></div><div>Any idea on the complexity in getting the above scripting to work?</div><div><br></div><div>Sincerely,</div><div><br></div><div>Kjell Are Refsvik</div><div>Norway</div><div><br></div></body></html>