[postgis-users] Geography or Geometry?

Li Li fancyerii at gmail.com
Thu Apr 8 23:58:31 PDT 2010


Hi all,
    I am a newbie in gis. I've a task to build a simple gis system for
querying something like where is the nearest 5 landmarks around some
landmark. I have a existed gis database in oracle 10g. I use
JTS(because my favorate program language is java) to transform the
SDO_GEOMETRY to com.vividsolutions.jts.geom.Geometry. From JTS's
Geometry I can use getGeometryType to get Type(such as Polygon),
toText to get WKT text(such as POLYGON ((13494705.5283976
4973005.22084221, ....)) and also SRID.
    Then I need to save this geometry object to PostGis data type. I
read the manual's chapter 4 and was confused of some concept such as
coordination system and projection. All I want to do is supporting
some query like where is the nearest 3 landmarks around some certain
landmark. And also I will crawl some more landmark from google which
has Longitude and Latitude and will be transformed to postgis data
type. It says Geography internally is modeled by Geographic coordinate
system which utilize Longitude and Latitude and Datum. it seems that
Geography is suitable. But it also says many function such as distance
is slow or even unavailable in Geography . Which on should I use? how
to transform Longitude/Latitude data to Geography/Geometry? PS: my
landmarks are limited to China. Thank you very much!



More information about the postgis-users mailing list