Hi,
I would like to discuss the addition of a few options to the CSS styling language.
Not sure if this list is the best one, the alternative would have been the GeoScript mailing list,
however CSS language seems to be a Scala thing (and it’s not really using GeoScript anyways),
so it seems to be it would have been noise over there… so I’ll start here, but let me know if
you feel a different place should be used.
So there are a few options that I’d like to add to CSS.
The first one is support for graphic margin specification in polygon fills, see here:
http://docs.geoserver.org/latest/en/user/styling/sld-extensions/margins.html
The option is closely related to CSS own margins (uses the same syntax).
If I had to follow the same pattern used today for vendor option, I guess it would
have to be named either -gt-margin and the SLD in the above links would be re-expressed
as CSS this way:
- {
fill: url(boulderGeometry.png), url(roughGrassFillSymbols.png);
fill-mime: ‘image/png’
}
:nth-mark(1) {
-gt-margin: 35 17 17 35
}
:nth-mark(2) {
-gt-margin: 16 16 32 32
}
However… I’m questioning why we have to add the -gt prefix. I mean, CSS is its own language,
so why do we have to stress that these are, in SLD, vendor options?
Wouldn’t it be cleaner to just accept them as CSS native options and use the following instead?
- {
fill: url(boulderGeometry.png), url(roughGrassFillSymbols.png);
fill-mime: ‘image/png’
}
:nth-mark(1) {
margin: 35 17 17 35
}
:nth-mark(2) {
margin: 16 16 32 32
}
The same line of thinking applies to all of the other -gt-… options, but I guess the cat is out of
the bag already for those, unless we deprecate the -gt names and start also supporting version
of those names without the -gt prefix.
Cheers
Andrea
–
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
The prefixes are there because the CSS converter is an SLD generator with a focus on GeoTools compatibility rather than a GeoTools extension. For example someone might want to use the standalone generator to create SLDs for another map server. If at some point in the future GeoTools gains the ability to render directly from CSS styles it might make sense to drop the SLD backend and start deprecating the -gt- prefix, but for now I think we should hang on to it.
···
On Tue, Aug 20, 2013 at 5:09 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:
Hi,
I would like to discuss the addition of a few options to the CSS styling language.
Not sure if this list is the best one, the alternative would have been the GeoScript mailing list,
however CSS language seems to be a Scala thing (and it’s not really using GeoScript anyways),
so it seems to be it would have been noise over there… so I’ll start here, but let me know if
you feel a different place should be used.
So there are a few options that I’d like to add to CSS.
The first one is support for graphic margin specification in polygon fills, see here:
http://docs.geoserver.org/latest/en/user/styling/sld-extensions/margins.html
The option is closely related to CSS own margins (uses the same syntax).
If I had to follow the same pattern used today for vendor option, I guess it would
have to be named either -gt-margin and the SLD in the above links would be re-expressed
as CSS this way:
- {
fill: url(boulderGeometry.png), url(roughGrassFillSymbols.png);
fill-mime: ‘image/png’
}
:nth-mark(1) {
-gt-margin: 35 17 17 35
}
:nth-mark(2) {
-gt-margin: 16 16 32 32
}
However… I’m questioning why we have to add the -gt prefix. I mean, CSS is its own language,
so why do we have to stress that these are, in SLD, vendor options?
Wouldn’t it be cleaner to just accept them as CSS native options and use the following instead?
- {
fill: url(boulderGeometry.png), url(roughGrassFillSymbols.png);
fill-mime: ‘image/png’
}
:nth-mark(1) {
margin: 35 17 17 35
}
:nth-mark(2) {
margin: 16 16 32 32
}
The same line of thinking applies to all of the other -gt-… options, but I guess the cat is out of
the bag already for those, unless we deprecate the -gt names and start also supporting version
of those names without the -gt prefix.
Cheers
Andrea
–
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
On Tue, Aug 20, 2013 at 4:01 PM, David Winslow <dwinslow@anonymised.com> wrote:
The prefixes are there because the CSS converter is an SLD generator with
a focus on GeoTools compatibility rather than a GeoTools extension. For
example someone might want to use the standalone generator to create SLDs
for another map server. If at some point in the future GeoTools gains the
ability to render directly from CSS styles it might make sense to drop the
SLD backend and start deprecating the -gt- prefix, but for now I think we
should hang on to it.
Ok, I see. So -gt-margin and the above approach is ok with you, right?
Cheers
Andrea
--
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
-------------------------------------------------------
Oh yes, the actual proposal sounds great.
···
On Tue, Aug 20, 2013 at 10:03 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:
On Tue, Aug 20, 2013 at 4:01 PM, David Winslow <dwinslow@anonymised.com> wrote:
The prefixes are there because the CSS converter is an SLD generator with a focus on GeoTools compatibility rather than a GeoTools extension. For example someone might want to use the standalone generator to create SLDs for another map server. If at some point in the future GeoTools gains the ability to render directly from CSS styles it might make sense to drop the SLD backend and start deprecating the -gt- prefix, but for now I think we should hang on to it.
Ok, I see. So -gt-margin and the above approach is ok with you, right?
Cheers
Andrea
–
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
On Tue, Aug 20, 2013 at 4:14 PM, David Winslow <dwinslow@anonymised.com> wrote:
Oh yes, the actual proposal sounds great.
https://github.com/dwins/geoscript.scala/pull/33
I've actually renamed it to -gt-graphic-margin to better align it with the
GeoTools
name, and added support for label obstacle as well while I was at it
Cheers
Andrea
--
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
-------------------------------------------------------