<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="sans-serif">I run into this difficulty too.. or kind of
similar issue.<br>
<br>
In a nutshell, I'm using EclipseLink and it does not recognized
Geography data type because there's no Geography class in
postgis-jdbc package.<br>
<br>
Actually, in my specific situation, I realized that I don't need
Geography data type and I don't need even Geometry data type at
all on the client side. At the moment, I've created column names
such as longitude, latitude, northing, easting, geography and
geometry that allows me perform any query I need on the database
side. I've also created indexes on geography and geometry columns
at the moment.<br>
<br>
If I need to do something like opening Google maps, for example,
all I need to do is transfer longitude and latitude to the client
side. So, again, this is highly unlikely that I need to transfer
geography or even geometry fields to the client side.<br>
<br>
Actually, at the moment, I'm only using Geometry data type (only
Points) and a Box2D which is intended to limit the domain of
Points which should be considered in a given query. </font><font
face="sans-serif">See more on this:
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/docs/ch04.html#id2638955">http://postgis.refractions.net/docs/ch04.html#id2638955</a></font><font
face="sans-serif"><br>
<br>
This is an example of a native query I perform on the database
side:<br>
<br>
select a.postcode from postcode a, location b <br>
where <br>
b.fips = 'UK' and b.location like 'British Museum, %' <br>
and a.geometry && st_expand(b.geometry, 1000) <br>
and st_distance(a.geometry, b.geometry) <= 200;<br>
<br>
There are ~1.7 million postcodes and ~250,000 locations in the
database.<br>
</font><font face="sans-serif">This query executes in about 40ms,
which is pretty decent.</font><font face="sans-serif"><br>
<br>
Regarding SRID, it depends on your application, accuracy you need,
etc.<br>
In my specific case, I only perform local queries, up to 50 miles.
So, I decided by storing Points matching the official SRID for a
given country. In the case of UK, I'm using this:
<a class="moz-txt-link-freetext" href="http://spatialreference.org/ref/epsg/7405/">http://spatialreference.org/ref/epsg/7405/</a><br>
I had to first do this:
<a class="moz-txt-link-freetext" href="http://spatialreference.org/ref/epsg/7405/postgis/">http://spatialreference.org/ref/epsg/7405/postgis/</a><br>
<br>
I hope it helps<br>
</font>
<pre class="moz-signature" cols="72">Richard Gomes
</pre>
On 05/04/11 15:42, maw269 wrote:
<blockquote cite="mid:31318489.post@talk.nabble.com" type="cite">
<pre wrap="">
I noticed that GeoServer 2.0.3 does not recognize (yet) Geography Data Types.
What would happen if you stored a lat/lon pair in a Geometry Data Type and
gave it an SRID of EPSG:4326? Is that even possible? Would that break the ST
functions available for Geometries?
Matt
</pre>
</blockquote>
</body>
</html>