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>