<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">While the maps displayed by Google Maps are in mercator, the Google Maps API never returns any mercator units, it only returns lat/lon, so you can just use 4326 as the SRID for your data.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>To do distance calculations, use distance_sphere (fast, less accurate) or distance_spheroid (slow, very accurate).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>P</DIV><DIV><BR><DIV><DIV>On 12-Jan-07, at 6:33 PM, Rob Young wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>I'm looking to make a small application with google maps and postgis, where I would enter spatial data into postgis via an interface that would use a (google) map to define lat/long points. I'm pretty familiar with databases, and know just enough about projection systems to know I don't know that much. ;) I am concerned about getting the following right, as I know if I don't I will be introducing errors into any calculations I attempt with postigs queries. </DIV> <DIV> </DIV> <DIV>I'm not completely sure which SRID to use with Google maps point data. I have found the following helpful message, but I was hoping to confirm that.</DIV> <DIV> </DIV> <DIV><A href="http://postgis.refractions.net/pipermail/postgis-users/2005-November/009920.html">http://postgis.refractions.net/pipermail/postgis-users/2005-November/009920.html</A></DIV> <DIV> </DIV> <DIV>If google maps does use the GRS 80 projection and a mercator projection, which SRID should I use when creating postgis tables to store said data? There are quite a few GRS 80 types in the spatial_ref_sys table. I know enough to know that choosing the correct one is important, but am really in the dark as to which one I should actually choose! :) </DIV> <DIV> </DIV> <DIV>Also, I will be interested in doing distance based queries (like everyone) on this data once it's in the database. The postgis function length uses the project you associate with the geometry data, correct? And the units of the number it returns is specified by the SRID? </DIV> <DIV> </DIV> <DIV>Thanks for the help,</DIV> <DIV> </DIV> <DIV>Robert Y</DIV><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; ">postgis-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>