[mapserver-dev] Beginning Mapserver & sql server 2008
Jeff McKenna
jmckenna at gatewaygeomatics.com
Thu Jul 2 09:38:26 EDT 2009
Wesley wrote:
> Hi Brent,
>
> I've done this and my conclusions are:
> . I can't use the geography type with mapserver. When I use this
> geometric type, i got an error:
> [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash:
> sys.geometry is incompatible with sys.geography.
>
> . When i use the geometry type, if I put the srid= 4326, the map
> doesn't show. Even when I put the project section on the map file.
>
> . When i use the geometry type, without the srid (srid=0) it works.
>
> Maybe there is a limitation in the code. For just to show the sql
> server geometry on a map is fine, but I'll do some more test with it.
>
> Thanks a lot for your help!
>
Whenever I test the sql server 2008 plugin with MS4W I follow this
tutorial for loading data into sql2008:
http://www.bostongis.com/PrinterFriendly.aspx?content_name=sql2008_tut01
It mentions to load the data as 'geometry (planar)', and explains why.
I do this and I have no troubles using EPSG codes in my mapfiles (see
below).
LAYER
NAME "mssql2008"
TYPE POINT
CONNECTIONTYPE PLUGIN
PLUGIN "E:/ms4w/Apache/specialplugins/msplugin_mssql2008.dll"
CONNECTION
"server=XPVM\Spatial;uid=jeff;pwd=marvin;database=gmap;Integrated
Security=false"
DATA "geom from popplace USING srid=4326"
STATUS ON
CLASS
NAME "popplace"
STYLE
COLOR 0 0 0
SYMBOL 'circle'
SIZE 5
END
END
PROJECTION
"init=epsg:4326"
END
END
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
More information about the mapserver-dev
mailing list