[Mapserver-users] symbol problem with auto style

Merrett, Mike mike.merrett at city.whitehorse.yk.ca
Tue May 25 15:08:30 EDT 2004


Sorry, I had cut down the map file for the email --  (but the line number
was the last end in the map file) -- here is everything again.

it appears that the symbol name it is looking for (in the map file or the
symbol file) is the either "TEXT" field or the "LABEL(t:xxxxx)" field which
will never exist ( I would have to create more than 1000 symbols)

the error log file has the following  (notice the numbers and text in the
brackets (this is the text:
Tue May 25 11:57:10 2004 - getSymbol(): Symbol definition error. Parsing
error near (408):(line 131)
Tue May 25 11:57:10 2004 - getSymbol(): Symbol definition error. Parsing
error near (P.U.L.  20):(line 131)
Tue May 25 11:57:10 2004 - getSymbol(): Symbol definition error. Parsing
error near (P.U.L. 21):(line 131)
Tue May 25 11:57:10 2004 - getSymbol(): Symbol definition error. Parsing
error near (407 REM):(line 131)
Tue May 25 11:57:10 2004 - getSymbol(): Symbol definition error. Parsing
error near (KODIAK PLACE):(line 131)
Tue May 25 11:57:10 2004 - getSymbol(): Symbol definition error. Parsing
error near (475):(line 131)


a block from the ogrinfo gives the following (note this is the only block
with the text KODIAK PLACE):

OGRFeature(CAD_text):7846
  DXF_ (Integer) = 7846
  DXF_ID (Integer) = 7846
  X (Real) = 494272.209545523
  Y (Real) = 6729098.07961854
  OFFSETX (Real) = 0
  OFFSETY (Real) = 0
  HEIGHT (Real) = 6
  SYMBOL (Integer) = 4
  LEVEL (Integer) = 5
  TEXT (String) = KODIAK PLACE
  e00_anno_id (Integer) = 7846
  e00_text_level (Integer) = 5
  e00_anno_name (String) = DXF
  Style = LABEL(t:"KODIAK PLACE",a:0.000000,s:4.799023g,c:#000000,p:1,f:"")
  POINT (494272.206 6729098.082)



The map file is (note if I uncomment the symbolset the error line is the
last one in the symbol file regardless of the contents of the symbol file ):

MAP
	debug true
	NAME Whitehorse
	STATUS ON
	SIZE 500 400
#	SYMBOLSET "e:\\VariousData\\Devel\\map_test\\etc\\symbols.sym"

	extent 485108.508198 6714194.605109 506888.578325 6745540.034837

	UNITS METERS
	SHAPEPATH "e:\\VariousData\\Devel\\map_test\\data"
	FONTSET "e:\\VariousData\\Devel\\map_test\\etc\\fonts.txt"

	IMAGECOLOR 255 255 255

	IMAGETYPE png24

	PROJECTION
			##  <32608>
		"proj=utm"
		#"init=epsg:32608"
		"ZONE=8"
		"ellps=WGS84"
		"datum=WGS84"
		"units=m"
		"north"
		"no_defs"
	END
	#
	# Start of web interface definition
	#
	WEB
		#MINSCALE 2000000
		minscale 5
		MAXSCALE 60000000

		IMAGEPATH "e:\\VariousData\\Devel\\map_test\\tmp\\"
		IMAGEURL "/map_test/tmp/"
		log 'gmap.log'

		METADATA
			"title" "Whitehorse, YT (General)"
			"author" "Mike Merrett"
		END
	END

	#
	# Start of reference map
	#
	REFERENCE
		IMAGE images/City_of_Whitehorse_key.png
		extent 485108.508198 6714194.605109 506888.578325
6745540.034837

		STATUS ON
		COLOR -1 -1 -1
		OUTLINECOLOR 255 0 0
		SIZE 120 90
	END

	#
	# Start of legend
	#
	LEGEND
		KEYSIZE 18 12
		LABEL
			TYPE BITMAP
			SIZE MEDIUM
		#	COLOR 0 0 89
		END
		STATUS ON
		#template "legend.html"
	END

	#
	# Start of scalebar
	#
	SCALEBAR
		IMAGECOLOR 255 255 255
		LABEL
			COLOR 0 0 0
			SIZE SMALL
		END
		SIZE 400 5
		COLOR 255 255 255
		BACKGROUNDCOLOR 0 0 0
		OUTLINECOLOR 0 0 0
		UNITS kilometers
		INTERVALS 5
		STATUS ON
	END


	QUERYMAP
		STYLE HILITE   #selected
		COLOR 255 0 0
	 # status on
	END

OUTPUTFORMAT
  NAME png24
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE rgba
  EXTENSION "png"
END

	LAYER
		NAME "Cadastre Text"
		CONNECTION
"e:\GIS_Claims\gisdata\MapInfo\Cadastre\CAD_text.tab"
		CONNECTIONTYPE OGR
		METADATA
			DESCRIPTION	"Cadastre Text"
		END
		STATUS ON
		TYPE annotation
		#minscale 100
		#MAXSCALE 5000
		STYLEITEM "AUTO"
		LABELITEM "TEXT"
		CLASS
			debug true
			NAME "Cadastre Text"
			LABEL
				position auto
				PARTIALS true
				angle auto
			END # end of label
		END
	END # layer
END

-----Original Message-----
From: Tyler Mitchell [mailto:TMitchell at lignum.com]
Sent: May 25, 2004 11:38 AM
To: Merrett, Mike
Cc: MapServer-Users (mail list) (E-mail)
Subject: RE: [Mapserver-users] (no subject)


>    Here is the map file.   I am not sure if it worked before I upgraded
> to 4.2b3 (as I didnt find the errorlog until after the upgrade)
> If I had to guess I would say that it is looking at the lable 
information
> and trying to decode a symbol out of it but all my lable texts are 
either
> random numbers or some text (i.e. lot numbers and street names) 

Looks bizarre to me - certainly not self-evident enough for me to help 
with. What I find strange is that your error references line 1363 I 
assumed this was referring to a line in your map file.  But your map file 
is <200 lines long.  Furthermore you are not explicitly setting  a SYMBOL 
for that layer. 

My guess is that the auto styling of your mapinfo has a problem.  Can you 
use "ogrinfo" utility to get find the details of the feature (styling 
info) that appears to be the problem?  Let me know if you need to find 
this utility or need more help debugging.  This may be a common problem - 
I'd suggest changing your subject line to something like "symbol problem 
with auto style" - perhaps others will have more insight.




More information about the mapserver-users mailing list