[mapserver-users] OGRVRT Data Sources and SQL server
Chris Jackson
webturtles at gmail.com
Mon May 28 08:01:43 PDT 2012
Hi all
Has anyone got much experience of using OGRVRT Data Sources in Windows with
SQL server system DSNs? I am having an issue with system DSN connection
type (windows authentication will work fine and proceses the table fine,
sql authentication - get not trusted connection (both authentication types
enabled in instance)) when testing via ogrinfo commandline.
Then if I take the working code forward then I can't render the layer in a
map output via say shp2img commandline or final map application. Map code
below:
LAYER
NAME "virtual"
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION
"<OGRVRTDataSource>
<OGRVRTLayer
name='omreg1'>
<SrcDataSource>ODBC:@omreg1</SrcDataSource>
<SrcSQL>SELECT * FROM
dbo.Site</SrcSQL>
<GeometryField encoding='PointFromColumns' x='SiteLong'
y='SiteLat'/>
<GeometryType>wkbPoint</GeometryType>
</OGRVRTLayer>
</OGRVRTDataSource>" # the name and path to the virtual.ovf file, relative
to shapepath may work?
DATA "omreg1"
TEMPLATE void
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_srs" "4326"
"wms_title" "virtual"
END
SIZEUNITS PIXELS
STATUS ON
TOLERANCE 0
TOLERANCEUNITS PIXELS
UNITS METERS
CLASS
NAME "Virtual"
COLOR 255 0 0
OUTLINECOLOR 255 0 0
SYMBOL 'kreuz4'
SIZE 6
END # Class
END
My version of mapserver is a little old (5.6.1). I wonder whether I need
to set any extra SQL related env variables.....
Any assistance much appreciated!
Thanks
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120528/76430ea3/attachment.htm>
More information about the MapServer-users
mailing list