[mapserver-users] ArcSDE MSSQL Label Items displaying incorrectly.

Neil Fincham neil at asdf.co.nz
Wed Oct 1 12:52:07 PDT 2008


Hi Nelson,

	Yeah, I had this problem a few months back, it all has to do with
Mapserver and Unicode, basically they don’t like each other ;) .

	What you need to do is unload your data, disable Unicode and then
reload it, for further reading on how to do this go here;-

http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Language_suppo
rt_in_the_geodatabase

	Basically you need to set UNICODE_STRING "FALSE" using sdedbtune,
then when you load your data it will be just plain old text that mapserver
does not have a problem with.

Thanks

Neil

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Nelson Soto
Sent: Thursday, 2 October 2008 3:29 a.m.
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] ArcSDE MSSQL Label Items displaying incorrectly.

Has anyone else run into an issue where trying to display a labelitem from
SDE that it is displayed incorrectly. 

This is my map file, it is for highways...


MAP
	NAME 'Highways 2'
	SIZE 800 650
	STATUS ON
	EXTENT  34847.155991 780218.437305 329932.687407 959485.530395
	UNITS METERS
	FONTSET '../fonts/fontset.list'
	SYMBOLSET '../symbols/symbol.sym'
	TRANSPARENT TRUE
	IMAGETYPE PNG

	QUERYMAP
		STATUS ON
	END

	LEGEND
	    LABEL 
	        TYPE TRUETYPE
            FONT ARIAL
            SIZE 10
	        COLOR 0 0 0
	    END
        STATUS ON
	END
    
    LAYER
        NAME major_roads-sde
  	    CONNECTIONTYPE PLUGIN
  	    CONNECTION "GEOTS,port:5151,medway,sa,geosql1230"
  	    PLUGIN "D:\ms4w\Apache\specialplugins\msplugin_sde_92.dll"
  	    DATA "medway.DBO.fcMajRoads,SHAPE"
  	    STATUS DEFAULT
        TYPE LINE
        MAXSCALE 250000
        SYMBOLSCALE 900000
        CLASSITEM "ADMIN_TYPE"
        CLASS
            NAME "State Highway"
            EXPRESSION "3"
            STYLE
                COLOR 120 120 120
                SYMBOL 'plainline'
                SIZE 3
                MINSIZE 1
                MAXSIZE 4
            END
            STYLE
                SYMBOL 'plainline'
                SIZE 1
                MINSIZE 1
                MAXSIZE 2
                COLOR 227 159 2
            END
        END
        CLASS
            NAME "U.S. Highway"
            EXPRESSION "2"
            STYLE
                COLOR 120 120 120
                SYMBOL "plainline"
                SIZE 3
                MINSIZE 1
                MAXSIZE 4
            END
            STYLE
                COLOR 109 223 77
                SYMBOL "plainline"
                SIZE 1
                MINSIZE 1
                MAXSIZE 2
            END
        END
        CLASS
            NAME "Interstate"
            EXPRESSION "1"
            STYLE
                COLOR 120 120 120
                SYMBOL "plainline"
                SIZE 3
                MINSIZE 1
                MAXSIZE 4
            END
            STYLE
                COLOR 255 255 136
                SYMBOL "plainline"
                SIZE 1
                MINSIZE 1
                MAXSIZE 2
            END
        END
    END

    LAYER
        NAME major_roadsanno-SDE
  	    CONNECTIONTYPE PLUGIN
  	    CONNECTION "GEOTS,port:5151,medway,sa,geosql1230"
  	    PLUGIN "D:\ms4w\Apache\specialplugins\msplugin_sde_92.dll"
  	    DATA "medway.DBO.fcMajRoads,SHAPE"
  	    STATUS DEFAULT
        TYPE annotation
        MAXSCALE 2000000
        LABELITEM 'RT_NUMBER'
        LABELCACHE ON
        CLASSITEM 'ADMIN_TYPE'
        CLASS
            EXPRESSION '1'
            COLOR 0 0 0 # dummy color
            SYMBOL '../symbols/interstate.png'
            LABEL
                MINFEATURESIZE 25
                MINDISTANCE 250
                SIZE TINY
                COLOR 254 254 254
            END
        END
        CLASS
	        EXPRESSION '3'
	        COLOR 0 0 0 # dummy color
	        SYMBOL '../symbols/USHWY.png'
	        LABEL
	          MINFEATURESIZE 25
	          MINDISTANCE 200
	          SIZE TINY
	          COLOR 0 0 0
	        END
        END
        CLASS
            EXPRESSION '2'
            COLOR 0 0 0 #dummy color
            SYMBOL '../symbols/STHWY.png'
            LABEL
                MINFEATURESIZE 25
                MINDISTANCE 150
                SIZE TINY
                COLOR 0 0 0
            END
        END
    END
END

If I replace the RT_Number field for an integer field, it displays
correctly. But if I use the RT_NUMBER (which the data exists as intended
when checked) it looks like âê and so on.

-----Original Message-----
From: Andreas Albarello [mailto:andreas.albarello at territoriumonline.com] 
Sent: Tuesday, September 30, 2008 4:25 PM
To: Nelson Soto
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] ArcSDE 9.3 Support.


On 30 Sep 2008, at 21:56, Nelson Soto wrote:

> After tracing dependencies with Dependency Walker, I can see sde.dll  
> and
> libmap.dll aren't loading correctly when loading  
> 'msplugin_sde_92.dll'.
>
> Any ideas on how to alleviate this?

Nelson,

dynamically loaded plugin dlls which in turn require other statically  
compiled libraries is where Windows dll hell starts to get really  
ugly. Windows tries to locate your sde libraries either in one of the  
directories contained in your %PATH% (probably set by setenv.bat but I  
don't use MS4W so I can't help you there) or, preferably, in the  
application's folder. By that, if I'm not mistaken, they mean the  
directory which the main executable image of your app is launched  
from, so probably the one containing mapserv.exe (or maybe the one  
where libmap.dll resides?). It's definitely not going to work if you  
place them relative to the plugin inside your specialplugins folder as  
that dll is dynamically loaded into the main application's process  
space. What I'm saying is that Dependency Walker won't help you in  
this case if you launch it directly on msplugin_sde_92.dll, because  
what counts is what mapserver.exe/libmap.dll sees, not the plugin.

Still, if all fails, you could always just drop the sde libs into c: 
\windows\system32 but I'm sure with some trial and error you'll find a  
place where they get picked up correctly.

Best regards,
--
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development

Territorium Online srl/GmbH
Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen
email: andreas.albarello at territoriumonline.com
web:   www.territoriumonline.com
--------------------------------------------------------------------

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list