<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Nur Text Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.NurTextZchn
        {mso-style-name:"Nur Text Zchn";
        mso-style-priority:99;
        mso-style-link:"Nur Text";
        font-family:"Calibri","sans-serif";}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
p.PlainText, li.PlainText, div.PlainText
        {mso-style-name:"Plain Text";
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.E-MailFormatvorlage23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage24
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.E-MailFormatvorlage25
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.E-MailFormatvorlage26
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Python 2.7 works for ogr2osm (if the bindings are installed properly). Thanks for the hint.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Now ogr2osm produces output. But it also produces warnings about “interior rings”. My shape file has inner and outer polygons. What can I do about this?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>D:\ENC>c:\python27\python ogr2osm\ogr2osm.py shp\fairwy.shp<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Preparing to convert file 'D:\ENC\shp\fairwy.shp' to 'D:\ENC\fairwy.osm'.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Will try to detect projection from source metadata, or fall back to EPSG:4326<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Using default translations<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Using default filterLayer<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Using default filterFeature<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Using default filterTags<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Using default filterFeaturePost<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Using default preOutputTransform<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Detected projection metadata:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>GEOGCS["GCS_WGS_1984",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>    </span><span style='color:#1F497D'>DATUM["WGS_1984",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        SPHEROID["WGS_84",6378137,298.257223563]],<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>    PRIMEM["Greenwich",0],<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>    </span><span lang=EN-US style='color:#1F497D'>UNIT["Degree",0.017453292519943295]]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Warning 1: organizePolygons() received an unexpected geometry.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Either a polygon with interior rings, or a polygon with less than 4 points,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>or a non-Polygon geometry.  Return arguments as a collection.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Warning 1: organizePolygons() received an unexpected geometry.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Either a polygon with interior rings, or a polygon with less than 4 points,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>or a non-Polygon geometry.  Return arguments as a collection.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Paul Norman [mailto:penorman@me.com] <br><b>Gesendet:</b> Montag, 5. März 2012 23:00<br><b>An:</b> RheinSkipper<br><b>Cc:</b> Paul Norman<br><b>Betreff:</b> Re: AW: [Imports] Using Rewritten ogr2osm<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>By installing python from both <a href="http://python.org">python.org</a> and the gdal package you've got two versions of python installed. What command did you use to start python before the import gdal test? <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Python 2.7 is what I'd suggest for gdal, but 2.5 or 2.6 should work.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Alternately, your problem could be caused by running ogr2osm under Python 3. I'm not at home right now so I'm not sure if the lambda syntax still works in Python 3.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>A third possibility is that you have both problems.<o:p></o:p></p></div><div><p class=MsoNormal><br>Sent from my iPad<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>On Mar 5, 2012, at 11:33 AM, RheinSkipper <<a href="mailto:rheinskipper1000@gmx.de">rheinskipper1000@gmx.de</a>> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span lang=EN-US>You are correct. Typing “import gdal” from the shell produces the same error.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>So I started again with a clean Windows and installed the following packages:</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>From <span style='color:#1F497D'><a href="http://python.org/download/">http://python.org/download/</a> </span>I installed Python 3.2.2 x86-64.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>From <span style='color:#1F497D'><a href="http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-0.zip">http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-0.zip</a> </span>I installed the core components:  </span><span style='font-size:9.5pt;font-family:"Verdana","sans-serif"'><a href="http://www.gisinternals.com/sdk/Download.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-0\gdal-19-1600-x64-core.msi"><span lang=EN-US>gdal-19-1600-x64-core.msi</span></a></span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>I also installed the corresponding python bindings for my python version: </span><span style='font-size:9.5pt;font-family:"Verdana","sans-serif"'><a href="http://www.gisinternals.com/sdk/Download.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-0\GDAL-1.9.0.win-amd64-py3.2.msi"><span lang=EN-US>GDAL-1.9.0.win-amd64-py3.2.msi</span></a></span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>Then I run gdalshell.bat from the gdal directory to setup the environment variables.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>Starting the console and typing „import gdal“ now produces no errors. Just “>>>” as a prompt.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>But trying ogr2osm fails again:</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>D:\ENC\ogr2osm>c:\python32\python ogr2osm.py --help</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>  File "ogr2osm.py", line 282</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>    reproject = lambda(geometry): None</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>                      ^</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>SyntaxError: invalid syntax</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>Do you suggest using another python or gdal version? Is one already tested with ogr2osm under Windows?</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>I know that the ogr2osm wiki suggests not running it under Windows. But I hoped only the original version may have problems, not the rewritten one. I´d really like to stay with Windows if somehow possible.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:"Verdana","sans-serif"'>                                                                                                                                                     </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Paul Norman </span><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><a href="mailto:[mailto:penorman@mac.com]"><span lang=DE>[mailto:penorman@mac.com]</span></a></span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <br><b>Gesendet:</b> Montag, 5. </span><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>März 2012 03:33<br><b>An:</b> 'RheinSkipper'; <a href="mailto:imports@openstreetmap.org">imports@openstreetmap.org</a><br><b>Betreff:</b> RE: [Imports] Using Rewritten ogr2osm</span><o:p></o:p></p></div></div><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Your error is likely caused by the python you are running not having the gdal-python bindings. Try running c:\python27\python and then typing import gdal. If it responds with a >>> then gdal is working. If not, then the python install you are running does not have the bindings. This can be caused by multiple python installations, you may need to use the python version that came with the osgeo tools.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>If you are eventually planning to use ogr2osm to prepare data for import, you will want to share the translations file in ogr2osm/translations/ that you create when you do the required consultation with imports@ and the local community.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p></div></div></blockquote></div></div></body></html>