<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Nick,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>osm2pgsql projects coordinates to Mercator. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Artem<BR><DIV><DIV>On 22 Jun 2007, at 13:24, Nick Black wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Hello,<BR><BR>Trying to run osm2pgsql I get some strange values in the geometry columns of postgis.  For example, if I import the following made up osm file:<BR><BR><BR clear="all"><?xml version="1.0" encoding="UTF-8"?> <BR><osm version="0.4" generator="OpenStreetMap server"><BR>  <way id="1" visible="true" timestamp="2006-08-18T22:51:40+01:00" user="dankarran"><BR>    <seg id="1"/> <BR>    <tag k="created_by" v="JOSM"/><BR>    <tag k="name" v="Marine Drive"/><BR>    <tag k="highway" v="secondary"/><BR>  </way><BR>  <segment id="1"  visible="true" timestamp="2006-08-18T22:51:40+01:00" from='1' to='2'> <BR>   </segment><BR>  <node id='1'  timestamp='2006-08-15 02:08:50' visible='true' lat='1.2345' lon='-6.789'><BR>    <tag k='source' v='PGS' /><BR>     <tag k='created_by' v='almien_coastlines' /><BR>  </node><BR>  <node id='2'  timestamp='2006-08-15 02:08:50' visible='true' lat='2.2345' lon='-7.789'> <BR>    <tag k='source' v='PGS' /><BR>    <tag k='created_by' v='almien_coastlines' /><BR>  </node><BR><BR></osm><BR><BR>and then do :<BR><BR># select astext(way) from planet_osm_roads ; <BR><BR>I get:<BR><BR> LINESTRING(-755748.02 136514.64,-867067.51 247141.71)<BR><BR>Which isnt what the values should be. Is there some kind of reprojection going on somewhere?  I have geometry columns and spatial ref sys set up seemingly correctly, with planet_osm_roads referencing srid 4326, which has the following entry ins spatial_ref_sys: <BR><BR>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree", 0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] | +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs <BR><BR>I'm taking a look through the osm2pgsql src to see how the database connections work, but the c++ will take me a while to figure out... <BR><BR>cheers,<BR><BR>-- <BR>Nick Black<BR>--------------------------------<BR><A href="http://www.blacksworld.net">http://www.blacksworld.net</A><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; 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; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Artem Pavlenko</DIV><DIV><A href="http://mapnik.org">http://mapnik.org</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>