<div dir="ltr">Thank you, this was really helpful!<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/2 Mike Toews <span dir="ltr"><<a href="mailto:mwtoews@gmail.com" target="_blank">mwtoews@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2 September 2013 18:10, Alexander Ulanov <<a href="mailto:avulanov@gmail.com">avulanov@gmail.com</a>> wrote:<br>

> Does this mean that all bounding box queries have to be written with casting<br>
> to geometry type? Bounding box originates from the browser with google maps.<br>
<br>
</div>I suppose so, as long as the map used to base the BBOX queries share<br>
the same grid orientation as a lat/long grid (not the case for UTM,<br>
LCC and others, but true for Mercator projections). To get a good idea<br>
of a straight line for the geography type you have to see it on a<br>
globe (or something like Google Earth), but never on a flat map.<br>
<div class="im"><br>
> Related question. Do I really need geography type for my locations if my<br>
> queries are only bounding box and st_dwithin ?<br>
<br>
</div>Geography types are still really handy for ST_DWithin, since they use<br>
nice linear metric units for distances. So I guess it depends how much<br>
you use this function or other distance-based functions. There are<br>
also several ways to get metric area and distance values from geometry<br>
data of long/lat too. Be sure to read the relevant manual section [1]<br>
to help you decide.<br>
<br>
[1] <a href="http://postgis.net/docs/using_postgis_dbmanagement.html#PostGIS_Geography" target="_blank">http://postgis.net/docs/using_postgis_dbmanagement.html#PostGIS_Geography</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-Mike<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>