<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Kjell,<div><br></div><div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Not having worked much with GIS systems or projection/coordinate systems before, I am struggling to understand the meaning of all this. However, the following (esriwkt) was the result of the visit to the link above, and I am injected it into the .prj file before running the script all over again:</div></div></div></blockquote><div><br></div>You are not alone. Projected coordinate systems can confuse beginners and experts alike.</div><div><br></div><div>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. </div><div><br></div><div><blockquote type="cite"> However, the following (esriwkt) was the result of the visit to the link above, and I am injected it into the .prj file before running the script all over again:</blockquote><blockquote type="cite"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">PROJCS["Nahrwan 1967 / UTM zone 39N",GEOGCS["Nahrwan 1967",DATUM["D_Nahrwan_1967",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]</span></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Please let me know if I got this completely wrong and please excuse my lack of knowledge here.</div><div><br></div></div></div></blockquote><div><br></div><div>First, you only need to assign the projection AFTER you run the txt2shp.py script.</div><div><br></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><br></div></div><div>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 (http://earth-info.nga.mil/GandG/coordsys/gislayers/zips/mgrs6x8.zip), both in the WGS 84/EPSG 4326 coordinate system.</div><div><br></div><div>If you have more GPS data from other countries I highly recommend getting familiar with UTM zones.</div><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>It did. Garmin GPSMap 60 CS.</div><div><br></div><div>But, still, even with the new projection file, this thing still looks like this:</div><div><br></div><div><font class="Apple-style-span" color="#144FAE"><span class="Apple-style-span" style="text-decoration: underline;"><a href="http://www.ia-stud.hiof.no/~kjellare/misc/gdal_fail3_lebanon.png">http://www.ia-stud.hiof.no/~kjellare/misc/gdal_fail3_lebanon.png</a></span></font></div><div><br></div><div>I even tried reversing the coordinates in the input file, but with almost the same result:</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(20, 79, 174); "><span class="Apple-style-span" style="text-decoration: underline; -webkit-text-decorations-in-effect: underline; "><a href="http://www.ia-stud.hiof.no/~kjellare/misc/gdal_fail3_lebanon2.png">http://www.ia-stud.hiof.no/~kjellare/misc/gdal_fail3_lebanon2.png</a></span></span></div><div><br></div><div>Hm... Not sure how to proceed from here.</div><br></div></div></blockquote><div><br></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><br></div><div>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:</div><div><br></div><div>$ ogr2ogr -s_srs EPSG:32636 -t_srs EPSG:4326 lebanon_points_wgs84.shp lebanon_points_utm36N.shp</div><div><br></div><div>Then, if the assumed source projection was correct, your new shapefile should line up with other data in WGS 84.</div><div><br></div><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>...</div>In Qgis you should be able to reproject to UTM and label your points. Qgis will also export to PNG format if that is what you want. However I don't think that Qgis will output an ESRI world file (the only way that I know to keep a PNG spatially reference... but the application uDIG will output a .wld world file to spatially reference a PNG).</div></div></blockquote><div><br></div><div>I am in need of a open source command-line style software here, in order to automate this entire endevour. </div><div>Both uDIG and QGIS appears to be GUI style applications.</div></div></div></blockquote><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Are there a way around this to let me export the shapefiles I have to a .png raster file to complete my mission?</div><div><br></div></div></div></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Kjell Are<div><br></div></div></blockquote></div><div><br></div>Yes, they are GUI applications... but don't you just need to automate the processing of your GPS data? 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><br></div><div><br></div><div><br></div><div>Dane</div><div><br></div><div><br></div><div><br></div><div><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; ">_______________________________________________</span></div></div></div></blockquote><blockquote type="cite">Discuss mailing list<br><a href="mailto:Discuss@lists.osgeo.org">Discuss@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/discuss<br></blockquote></div><br></div></body></html>