Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

When using a SQL database as the store, Geoserver requires that the spatial data are stored in a geometry, not geography column. Naturally, as we are dealing with geospatial features and not just Euclidean planar geometry, one would expect the opposite to be true.

Is there any reason for this? Am I missing something important about these two datatypes?

share|improve this question
    
What DBMS are you using? –  CaptDragon Apr 16 '12 at 13:02
    
I tried this with MS SQL 2008. But I believe that JDBC used by GeoServer is a quite universal interface, so I don't think this is related to a particular DB... or is it? –  Imp Apr 16 '12 at 13:04
add comment

2 Answers 2

up vote 2 down vote accepted

It is not clear as to what backend database you are using? Also need to know the version of GeoServer as well to give a definitive answer. For PostGIS geography is supported in recent versions of geoserver 2.1. If you are referring to SQL server then I do not believe geography support is implemented.

share|improve this answer
    
I am using Geoserver 2.1.2 and yes, the DB is MSSQL. If PostGis works fine, then it is probably a bug in the MSSQL plugin for Geoserver. –  Imp Apr 16 '12 at 13:06
add comment

You may want to ask this on the geoserver mailing list - http://geoserver.org/display/GEOS/Mailing+Lists

At least with PostGIS, a geography type is distinct from a geometry type. There's a little information here but basically (as you probably already know):

  • geography is for spherical
  • geometry is for cartesian

In the case of web-mapping in general, the defacto coordinate system has become Mercator/Web-mercator which is cartesian and therefore should be stored in geometry.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.