Re: [mapserver-users] Scaling Image Symbol Offset

2009-08-14 Thread Havard Tveite

Dear Steve,

Is this another case for allowing the user to explicitly specify
the centre of a symbol (as proposed in RFC 45 -
http://mapserver.org/development/rfc/ms-rfc-45.html)?

Håvard

Steve Lime wrote:

Hi David: There is no connection between offset and symbol size. The offset is 
independent and given
as a constant value in pixels (although it is scaled). Sounds like you need to 
change it dynamically based
on your image size and that can't be done as things sit now. Can you fix your 
image size or is it and I'm
missing something.

Steve


On 7/16/2009 at 3:51 AM, in message

9c37154dc7c8074fbc34214363755b7c330...@itb-svr-01.itbeyond.local, David
Martin da...@itbeyond.com.au wrote:

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



--
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Scaling Image Symbol Offset

2009-08-13 Thread Steve Lime
Hi David: There is no connection between offset and symbol size. The offset is 
independent and given
as a constant value in pixels (although it is scaled). Sounds like you need to 
change it dynamically based
on your image size and that can't be done as things sit now. Can you fix your 
image size or is it and I'm
missing something.

Steve

 On 7/16/2009 at 3:51 AM, in message
9c37154dc7c8074fbc34214363755b7c330...@itb-svr-01.itbeyond.local, David
Martin da...@itbeyond.com.au wrote:
 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


Re: [mapserver-users] Scaling Image Symbol Offset

2009-07-17 Thread Andreas Albarello

David Martin wrote:
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?


David,

unfortunately, OFFSET behaves exactly the way you are pointing out, that 
is, it doesn't scale because it's values are expressed in pixels no 
matter what SIZEUNITS or SYMBOLSCALE.


As to the task you would like to accomplish, though, what about making 
the image itself twice as tall and moving the symbol into the upper half 
of the image, thus having the center of your image located beneath the 
symbol itself? The image would still scale correctly and account for 
offsetting the symbol by itself.


Best regards,
--

Andreas Albarello
Analysis  SW Development

Territorium Online srl/GmbH
Via Buozzi Str. 12
I 39100 Bolzano/Bozen

Phone:  +39 0471 068611
Fax:+39 0471 068619

email: andreas.albare...@territoriumonline.com
web:   http://www.territoriumonline.com

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Scaling Image Symbol Offset

2009-07-17 Thread Havard Tveite

RFC 45 suggests several rendering improvements for Mapserver,
including adding a tag (CENTER/ORIGIN) for specifying the
centre of a symbol.  This feature has, however, not been
given priority yet (there are workarounds for the most
important cases).

http://mapserver.org/development/rfc/ms-rfc-45.html

--
CENTER/ORIGIN [x y]

Defines the centre of the symbol using decimal pixels (x axis increasing to the 
right, y axis increasing downwards).

* Is used for placing a point symbol on the map or on a “decorated” line
* Defines the center of rotation if an ANGLE is specified for point symbols.
* Default value is the centre of the symbol’s bounding box.
* Applies to TYPE ellipse, vector, pixmap, truetype.
--

Håvard

David Martin wrote:
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



--
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Scaling Image Symbol Offset

2009-07-16 Thread David Martin
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