<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>Hi all,</div><div><br></div><div>I've imported geographic data of a region between France, Spain and Andorra. The SRID is 900913 and the coords looks like that :</div>
<div><br></div><div>"POINT(159254.030883177 5404632.29913214)"</div><div><br></div><div>I can retreive the lati/longi by transforming this geometry like this :</div><div><br></div><div>SELECT St_AsText(St_Transform(myPoint, 4326));</div>
<div><br></div><div>Which give me the point :</div><div><br></div><div>"POINT(1.4306033 43.6057492)"</div><div><br></div><div>With shp2pgsql, I've imported world borders (with SRID 900913). France contains some polygons like this :</div>
<div><br></div><div>"POLYGON((-3.576667 48.803886,-3.582222 48.803886,-3.582778 48.80722,-3.579722 48.809715,-3.575556 48.812492,-3.570834 48.812775,-3.565278 48.811661,-3.563334 48.808609,-3.566112 48.805832,-3.576667 48.803886))"</div>
<div><br></div><div>And when I transform it to SRID 4326, I obtain this :</div><div><br></div><div>"POLYGON((-3.21297463230592e-005 0.000438412767172082,-3.2179647737092e-005 0.000438412767172082,-3.21846423700717e-005 0.000438442717005185,-3.2157189854989e-005 0.000438465129979636,-3.21197660402526e-005 0.000438490076189558,-3.20773475925365e-005 0.000438492618419637,-3.20274371953508e-005 0.000438482611185999,-3.20099739462275e-005 0.000438455194601089,-3.20349291448203e-005 0.000438430248391167,-3.21297463230592e-005 0.000438412767172082))"</div>
<div><br></div><div>Why the france borders coords at SRID 900913 does not have the same type of numbers than the data coords ? I mean for the +/- the same geographic zone and with the same SRID, I have my data which have a longitude of about 159254 and in the borders -3.576667..</div>
<div><br></div><div>The goal is to know in which country is a point. I made a query like this :</div><div>SELECT country_name FROM world_borders b WHERE St_Contains(geom, myPoint) = TRUE;</div><div>This does not work (no result).</div>
<div><br></div><div>I tried another query :</div><div>SELECT country_name FROM world_borders b WHERE St_Contains(St_Transform(geom, 4326), St_Transform(myPoint, 4326)) = TRUE</div><div>Thos works but take a very long time to execute.</div>
<div><br></div><div>Why it does not work with both SRID 900913 but it works with both SRID 4326 ?</div><div><br></div><div>Thank you very much :)</div><div>Kin</div></span>