[Geoserver-devel] Adding point offset support to CSS

Hi,
as part of http://jira.codehaus.org/browse/GEOT-4537 I’ll be SE 1.1 point displacement
for SE 1.1 (and possibly have that supported as a vendor extension to SLD 1.0),
and I’d like to add support for that also in CSS.

Basically the idea is that one can offset a point by a certain amount of pixels from its natural
position, same as we do for point labels today.

Given that the option is the same as labels, I’d say to use a new mark-offset option for it, e.g.:

  • {
    mark: url(smileyface.png);
    mark-mime: “image/png”;
    mark-offset: 10 15
    }

I was thinking that if only one of the two is specified, it would be the X value, and Y would
be assumed to be 0. Either that, or just complain and demand that both of them are specified.

Opinions?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


This proposal sounds good too. My vote for handling offsets with only one value is to default the y to zero as you say.

···

On Tue, Aug 20, 2013 at 5:13 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
as part of http://jira.codehaus.org/browse/GEOT-4537 I’ll be SE 1.1 point displacement
for SE 1.1 (and possibly have that supported as a vendor extension to SLD 1.0),
and I’d like to add support for that also in CSS.

Basically the idea is that one can offset a point by a certain amount of pixels from its natural
position, same as we do for point labels today.

Given that the option is the same as labels, I’d say to use a new mark-offset option for it, e.g.:

  • {
    mark: url(smileyface.png);
    mark-mime: “image/png”;
    mark-offset: 10 15
    }

I was thinking that if only one of the two is specified, it would be the X value, and Y would
be assumed to be 0. Either that, or just complain and demand that both of them are specified.

Opinions?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

I’m probably misunderstanding this, but I think you’re saying that for mark-offset: 10; you would take y as 0.

In CSS margin, overflow, etc. the handling of missing values is different. It is treated as if you want the same value for all/both.

Simon

Simon Hartley
Software Developer, AirData

Tel: +44(0) 1293 400888

Fax: +44(0) 1293 404888

Web: www.airdata.co.uk

Description: Description: ADL-5cm-Logo---Web-Quality


World Fuel Services Europe, Ltd.

Registered in England and Wales. Registered No. 4846814.

Registered address: Millennium Bridge House, 2 Lambeth Hill, London EC4V 4AJ


From: David Winslow [mailto:dwinslow@anonymised.com]
Sent: 20 August 2013 15:18
To: Andrea Aime
Cc: Geoserver-devel
Subject: Re: [Geoserver-devel] Adding point offset support to CSS

This proposal sounds good too. My vote for handling offsets with only one value is to default the y to zero as you say.

David Winslow

OpenGeo - http://opengeo.org/

On Tue, Aug 20, 2013 at 5:13 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,

as part of http://jira.codehaus.org/browse/GEOT-4537 I’ll be SE 1.1 point displacement

for SE 1.1 (and possibly have that supported as a vendor extension to SLD 1.0),

and I’d like to add support for that also in CSS.

Basically the idea is that one can offset a point by a certain amount of pixels from its natural

position, same as we do for point labels today.

Given that the option is the same as labels, I’d say to use a new mark-offset option for it, e.g.:

  • {

mark: url(smileyface.png);

mark-mime: “image/png”;

mark-offset: 10 15

}

I was thinking that if only one of the two is specified, it would be the X value, and Y would

be assumed to be 0. Either that, or just complain and demand that both of them are specified.

Opinions?

Cheers

Andrea

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


Geoserver-devel mailing list
Geoserver-devel@anonymised.coms.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

*** This communication has been sent from World Fuel Services
Corporation or its subsidiaries or its affiliates for the intended recipient
only and may contain proprietary, confidential or privileged information.
If you are not the intended recipient, any review, disclosure, copying,
use, or distribution of the information included in this communication
and any attachments is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to this
communication and delete the communication, including any
attachments, from your computer. Electronic communications sent to or
from World Fuel Services Corporation or its subsidiaries or its affiliates
may be monitored for quality assurance and compliance purposes.***

On Wed, Aug 21, 2013 at 12:21 PM, Simon Hartley <SHartley@anonymised.com>wrote:

I’m probably misunderstanding this, but I think you’re saying that for
mark-offset: 10; you would take y as 0.****

In CSS margin, overflow, etc. the handling of missing values is different.
It is treated as if you want the same value for all/both.

And in those cases it makes sense, because we are talking about properties
where it's desirable to have some symmetry
by default.
But, does CSS have any concept of offset/displacement we could copy from?
I see there is position/left/top that communicate a similar concept:
http://www.w3schools.com/cssref/pr_class_position.asp
If I only specify left, I'm not going to assume that top automatically got
the same value as left, or not?

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Fair enough. For background-position it does the “use default” strategy. In that case the default is “center”.

http://www.w3schools.com/cssref/pr_background-position.asp

Simon

From: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] On Behalf Of Andrea Aime
Sent: 21 August 2013 11:27
To: Simon Hartley
Cc: David Winslow; Geoserver-devel
Subject: Re: [Geoserver-devel] Adding point offset support to CSS

On Wed, Aug 21, 2013 at 12:21 PM, Simon Hartley <SHartley@anonymised.com> wrote:

I’m probably misunderstanding this, but I think you’re saying that for mark-offset: 10; you would take y as 0.

In CSS margin, overflow, etc. the handling of missing values is different. It is treated as if you want the same value for all/both.

And in those cases it makes sense, because we are talking about properties where it’s desirable to have some symmetry

by default.

But, does CSS have any concept of offset/displacement we could copy from?

I see there is position/left/top that communicate a similar concept:

http://www.w3schools.com/cssref/pr_class_position.asp

If I only specify left, I’m not going to assume that top automatically got the same value as left, or not?

Cheers

Andrea

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


*** This communication has been sent from World Fuel Services
Corporation or its subsidiaries or its affiliates for the intended recipient
only and may contain proprietary, confidential or privileged information.
If you are not the intended recipient, any review, disclosure, copying,
use, or distribution of the information included in this communication
and any attachments is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to this
communication and delete the communication, including any
attachments, from your computer. Electronic communications sent to or
from World Fuel Services Corporation or its subsidiaries or its affiliates
may be monitored for quality assurance and compliance purposes.***