[mapserver-users] GRID or not to GRID (USNG question)

Brent Fraser bfraser at geoanalytic.com
Thu Sep 18 16:17:22 EDT 2008


Bob,

  I now get the username dialog when I try to turn on layers.

I think you will be able to get some improvement with the GRID Layer's LABEL POSITION settings, but in the end it will not be perfect.  To get a finer level of control over the GRID LABELs, we need to introduce some more map file objects.

Here's some of my notes from March (the last time we talked about this)

	Need concept of margin so phantom lines in margin not labeled

	Labels should be gapped relative to margin/neatline, not extent of output graphic file
	    - gap should be user-settable parameter

	Text placement must take into account non-90 deg map rotation (must include dx and dy of text box)


So possible map file objects might be:

	MARGIN
		WIDTH:	width specified in pixels (left, right, top, bottom?)
		SHAPE:	PROJECTED, GEOGRAPHIC (follows curved graticule lines)
		TRANSPARENCY: 0 - 100 %
	TICS: length in pixels (left, right, top, bottom?)
	NEATLINE: thickness, style
	ANNO: 
		GAP: in pixels from margin/neatline, or as mult of text size
		ORIENTATION: UP, PARALLEL
	LABEL: 
		FORMAT:   deg/min/sec symbols, linear units
		STYLE:    sub/superscript (see USNG, or UTM labels on Canadian NTS sheets)
		TRUNCATE: full/partials

	others?...

And I have no idea how polar projection map GRID labels would be spec'd out.

See the attached PNG graphic for my prototype (with still lots of problems).  That should get the creative juices flowing...

Brent


Bob Basques wrote:
> Brent,
>  
> I figured out the publishing problem (my error) for the Web Interface.  
> This link should work now:
>  
> http://gis.ci.stpaul.mn.us/gis/gismo_public/html/?mapbook=/datasets/CONFIGS/SAINT_PAUL/PUBLIC_WORKS/MAPBOOKS/TS/usng_1st_public.xml
>  
> It will give you a better idea of the labeling problems at different 
> scales of view that I'm running into.
>  
> We actually did some code change in MapServer to get to the point of 
> even coming close to the USNG formats, but it still comes up short.
>  
> Thanks
>  
> bobb
>  
> 
> 
>> >> Brent Fraser <bfraser at geoanalytic.com> wrote:
> Bob,
> 
>   I seem to remember experimenting with different LABEL -> POSITION 
> settings in the GRID layer.  I'll try to find my map file.
> 
> Brent
> 
> Bob Basques wrote:
>>  Brent,
>> 
>>  Sorry about that, I really need to get a test box for outside posting of
>>  things.  :c)
>> 
>>  Here is a screenshot about what I'm talking about:
>> 
>> 
>>  Basically I want to align the labels along the edges.  I've tried a few
>>  different things to fake it with some positive results, But nothing that
>>  I can implement as a production piece because it needs some sort of
>>  manual intervention in the final process.
>> 
>>  The entities are predefined lines as a SHP file that I'm labeling. Now
>>  using the MapServer Grid Object I got this far:
>> 
>> 
>>  But even this is not getting me to the final destination.  There's not
>>  much control on numbering and the process is fairly slow compared to
>>  just labeling the lines.
>> 
>>  Any ideas?
>> 
>>  bobb
>> 
>>
>>
>> > >> Brent Fraser <bfraser at geoanalytic.com> wrote:
>>  Bob,
>>
>>   I get a Username/Password request dialog from the URL...
>>
>>  Brent Fraser
>>
>>  Bob Basques wrote:
>> >  All,
>> >
>> >  in the following interface:
>> >
>> >
>> 
> http://gis.ci.stpaul.mn.us/gis/gismo_public/html/?mapbook=/datasets/CONFIGS/SAINT_PAUL/PUBLIC_WORKS/MAPBOOKS/TS/usng_1st.xml
>> >
>> >  The last two layers in the "US National Grid Layers" folder show a layer
>> >  with lines Easting and Northing, that I want to label.  They label just
>> >  fine, but I would like to align them along an edge of the view
>> >  automatically, the ideal situation would be to have two labels on each
>> >  end of the lines along the edges of the view.
>> >
>> >  We've tried using the GRID object, even going so modifying the source
>> >  for GRID, you can see an example in the third to last layer above, "USNG
>> >  via MapServer GRID" (Wait for it, it's kinda slow right now)  And just
>> >  can't seem to get the output in any sort of usable result for printing.
>> >
>> >  Question, anyone got any ideas about how to align those labels along the
>> >  edges?
>> >
>> >  Thanks
>> >
>> >  bobb
>> >
>> >
>> >
>> >
>> >  ------------------------------------------------------------------------
>> >
>> >  _______________________________________________
>> >  mapserver-users mailing list
>> >  mapserver-users at lists.osgeo.org
>> >  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>  _______________________________________________
>>  mapserver-users mailing list
>>  mapserver-users at lists.osgeo.org
>>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alberta_v5.0.2_postfix_norot.png
Type: image/png
Size: 194829 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080918/c8cac169/alberta_v5.0.2_postfix_norot-0001.png


More information about the mapserver-users mailing list