Re: [mapserver-users] OGR MSSQL Server on specified Port Number fails to connect
Ticket #4885 Created. David From: Tamas Szekeres [mailto:szeker...@gmail.com] Sent: Tuesday, 6 November 2012 4:07 PM To: David Martin Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] OGR MSSQL Server on specified Port Number fails to connect David, This might indeed be a bug in the OGR driver. Just file a ticket for that in the GDAL issue trackerhttp://trac.osgeo.org/gdal/newticket. Best regards, Tamas 2012/11/6 David Martin da...@itbeyond.com.aumailto:da...@itbeyond.com.au Hi, I have a geodata source on SQLServer 2008 and have been using for a number of years the msplugin_mssql2008.dll plugin. I now want to use some stored procedures in my SQL server to render the geo data to MapServer. So I have been working with the OGR driver however I have found what I think is a problem when the SQL server is on a none standard TCP port as the comma in the server definition gets thrown away when rendering the layer using a map file via shp2img. I can use ogrinfo without problem but as soon as I carry the string to the OGR layer in the .map file and run shp2img –all_debug 1 I see that the tcp port of my SQL server is removed and hence the connection fails. So the working OGR syntax is: ogrinfo MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670;tables=PointPlace_Waypoints(Position) -summary INFO: Open of `MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670;tables=PointPlace_Waypoints(Position)' using driver `MSSQLSpatial' successful. 1: PointPlace_Waypoints NOTE: The TCP Port is 4670 – this is the same as used in the mssql2008.dll plug in. When I use shp2img this is what I get: shp2img -m latest.map -o test.png -all_debug 1 msDrawMap(): rendering using outputformat named png (AGG/PNG8). msOGRFileOpen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670)... OGROPen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server= MY_WEB-SqlServer.com) msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `latest1'. Unable to initialize connection to the server for MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com, [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. msDrawMap(): Image handling error. Failed to draw layer named 'latest1'. msDrawMap(): Image handling error. Failed to draw layer named 'latest1'. br msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `latest1'. Unable to initialize connection to the server for MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com, [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. You will notice that two lines: msOGRFileOpen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670)... OGROPen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server= MY_WEB-SqlServer.com) The system is calling msOGRFileOpen with a ,4670 but the OGROPen has removed the comma and tcp port number hence my connection fails. Is there a resolution to this or is there another way to execute stored procedures with MapServer layers? David ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] OGR MSSQL Server on specified Port Number fails to connect
Hi, I have a geodata source on SQLServer 2008 and have been using for a number of years the msplugin_mssql2008.dll plugin. I now want to use some stored procedures in my SQL server to render the geo data to MapServer. So I have been working with the OGR driver however I have found what I think is a problem when the SQL server is on a none standard TCP port as the comma in the server definition gets thrown away when rendering the layer using a map file via shp2img. I can use ogrinfo without problem but as soon as I carry the string to the OGR layer in the .map file and run shp2img -all_debug 1 I see that the tcp port of my SQL server is removed and hence the connection fails. So the working OGR syntax is: ogrinfo MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670;tables=PointPlace_Waypoints(Position) -summary INFO: Open of `MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670;tables=PointPlace_Waypoints(Position)' using driver `MSSQLSpatial' successful. 1: PointPlace_Waypoints NOTE: The TCP Port is 4670 - this is the same as used in the mssql2008.dll plug in. When I use shp2img this is what I get: shp2img -m latest.map -o test.png -all_debug 1 msDrawMap(): rendering using outputformat named png (AGG/PNG8). msOGRFileOpen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670)... OGROPen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server= MY_WEB-SqlServer.com) msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `latest1'. Unable to initialize connection to the server for MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com, [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. msDrawMap(): Image handling error. Failed to draw layer named 'latest1'. msDrawMap(): Image handling error. Failed to draw layer named 'latest1'. br msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `latest1'. Unable to initialize connection to the server for MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com, [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. You will notice that two lines: msOGRFileOpen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server=MY_WEB-SqlServer.com,4670)... OGROPen(MSSQL:uid=xxx;pwd=xxx;database=xxx;Integrated Security=false;server= MY_WEB-SqlServer.com) The system is calling msOGRFileOpen with a ,4670 but the OGROPen has removed the comma and tcp port number hence my connection fails. Is there a resolution to this or is there another way to execute stored procedures with MapServer layers? David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Scaling Image Symbol Offset
I am developing a new application and am rendering around a load of graphic symbol layers using a Map file layer such as LAYER NAMEcape_headland_point STATUS ON GROUP all DATA'ExplorOz/Places/Cape,Headland,Point' TYPEPOINT SYMBOLSCALE 100 CLASS STYLE SYMBOL [POIImage] MAXSIZE 15 MINSIZE 4 SIZE 8 END END METADATA wms_title Capes, Headlands Points END PROJECTION +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs END END As you can see I am sizing the output symbol which is a 20x20px PIXMAP image - this is working great however the position of the image needs to be OFFSET up by half the size of the image (to make the actual point be the center of the image) - I have tried using OFFSET however when the image size changes (based on SYMBOLSCALE)the offsets are wrong. Is there a way to OFFSET image symbols based on the SYMBOLSCALE and MAX/MIN SIZES? Regards David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: Symbol Style Angle Seems Incorrect (MapServer 5.0.2)
I found some TRAC history on this issue and it appears to have been reported. I have also worked around the problem by changing the | char to a - character and increasing the symbol size in the map file. Just wanted to post this update for other looking at the same issue. Regards David Martin ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Symbol Style Angle Seems Incorrect (MapServer 5.0.2)
Hi, Using MapServer 5.0.2 I am using a database bind for a SYMBOL Style Angle however I am finding that the ANGLE show appears to be out and rendering backwards ie: ANGLE 10 is sloping a little to the left not right and angle 350 is sloping to the right. I am using a symbol made up of a | char as below: SYMBOL NAME 'landingground' TYPE TRUETYPE CHARACTER | FONT ARIAL POSITION CC END Showing on a map using CLASS NAME 'Landing Ground' EXPRESSION /3/ STYLE SYMBOL 'circle' SIZE 10 MAXSIZE 18 MINSIZE 10 COLOR 255 0 0 END STYLE SYMBOL 'circle' SIZE 9 MAXSIZE 17 MINSIZE 9 COLOR 255 255 255 END STYLE SYMBOL 'landingground' SIZE 5 MAXSIZE 12 MINSIZE 5 COLOR 255 0 0 ANGLE [ORIENTATN] # supplied from ShapeFile ANTIALIAS TRUE END END When I render this URL: http://mt1.exploroz.com/iMapPlot/GetMapTile.aspx?reload=1key=testmode= mapmap_imagetype=pngmapext=13523695.804194272+-3421332.5005978127+1352 6141.78909896+-3418886.5156931253imgext=13523695.804194272+-3421332.500 5978127+13526141.78909896+-3418886.5156931253map_size=256+256imgx=128 imgy=128imgxy=256+256 (One of the tiles for my OL system) - showing an Airport defined at ANGLE 321 you will see the Airstrip sloping to the right when it should be mirrored and sloping to the left. Any one else seen this or have a fix? Regards David Martin ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: CGI Class Expression V5.0.2 cannot change
Sorry to be a bother I found a solution using variable substitution and I am happy to use that method. It actually makes for smaller cgi command line calls, so it is a better option all round. Info found at : http://www.nabble.com/mapserver-5-expression-td12386097.html#a12414895 Regards David Martin Managing Director I.T. Beyond Pty Ltd Postal: PO BOX 967 HILLARYS WA 6923 Ph: (08) 9403 3737 Mobile: 0417 677 275 Fax: (08) 9403 3738 Skype: itbeyond_david Check out our websites: www.ExplorOz.com and www.itbeyond.com.au ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users