GeoServer HTML ImageMap extension?

View: New views
14 Messages — Rating Filter:   Alert me  

GeoServer HTML ImageMap extension?

by meinc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Has anyone yet implemented a GeoServer service that is capable of producing HTML image maps?
The only hint on the web I found is that mapbender seems to offer such a service, where GML is translated to an HTML Image Map. However, mabpender talks PHP, which I don't.

If no such service has yet been implemented, what would be the best way to set it up?
Is it reasoable to realize it as a MapProducer, i.e. add a custom GetMapProducerFactorySpi entry?

Since I've absolutely no experience with geo coordinate transformations my main problem is
how to translate the GML coordinates into the corresponding pixel. So my first idea was to
look at the WMS image producers that somehow renders the pixels.

What I found so far was the use of

org.geotools.renderer.lite.LiteShape2 within org.geotools.renderer.lite.StreamingRenderer
which provides in its constructor the magic transformation, i.e.
decimator.decimateTransformGeneralize(this.geometry,this.mathTransform);

Where may I found more information on how to transform the coordinates to pixels?

~Bob

Re: GeoServer HTML ImageMap extension?

by aaime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

w2y4m ha scritto:
> Has anyone yet implemented a GeoServer service that is capable of producing
> HTML image maps?

Not as far as I know

> The onlyhint on the web I found that mapbender seems to offer such a service
> which translates GML to an HTML Image Map. However, mabpender talks PHP,
> which I don't.
>
> If no such service has yet been implemented, what would be the best way to
> set it up?

Hum, probably as a WMS output format, a cross between SVGMapProducer
and the default raster output. From the former I would take the approach
to encode stuff directly in a text format (see SVGEncode.java), from the
latter the code needed to compute a transformation (both scale and
eventually reprojection, see StreamingRenderer.java in GeoTools) and to
generalize polygons so that your image map does not get containing
houndreds of thousands of points (see Decimator.java, again in GeoTools).


> Is it reasoable to realize it as a MapProducer, i.e. add a custom
> GetMapProducerFactorySpi entry?

Yep, exactly what I was talking about (and remember to register the
factory into applicationcontext.xml or it won't be picked up).

Hope this helps
Cheers
Andrea


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by Tim Robertson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi w2y4m

This is something that I think would be an excellent plugin.  We for example
have a wish for a HTML/JS country selector based on shape files with the
ability to do client "CSS hover-over" type effects (e.g. hover over UK and
it shows up in RED fill for example) at different zoom levels, as opposed to
getFeatureInfo requests.  

Tim

-----Original Message-----
From: geoserver-devel-bounces@...
[mailto:geoserver-devel-bounces@...] On Behalf Of Andrea
Aime
Sent: Monday, September 03, 2007 7:10 PM
To: w2y4m
Cc: geoserver-devel@...
Subject: Re: [Geoserver-devel] GeoServer HTML ImageMap extension?

w2y4m ha scritto:
> Has anyone yet implemented a GeoServer service that is capable of
producing
> HTML image maps?

Not as far as I know

> The onlyhint on the web I found that mapbender seems to offer such a
service
> which translates GML to an HTML Image Map. However, mabpender talks PHP,
> which I don't.
>
> If no such service has yet been implemented, what would be the best way to
> set it up?

Hum, probably as a WMS output format, a cross between SVGMapProducer
and the default raster output. From the former I would take the approach
to encode stuff directly in a text format (see SVGEncode.java), from the
latter the code needed to compute a transformation (both scale and
eventually reprojection, see StreamingRenderer.java in GeoTools) and to
generalize polygons so that your image map does not get containing
houndreds of thousands of points (see Decimator.java, again in GeoTools).


> Is it reasoable to realize it as a MapProducer, i.e. add a custom
> GetMapProducerFactorySpi entry?

Yep, exactly what I was talking about (and remember to register the
factory into applicationcontext.xml or it won't be picked up).

Hope this helps
Cheers
Andrea


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by aaime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tim Robertson ha scritto:
> Hi w2y4m
>
> This is something that I think would be an excellent plugin.  We for example
> have a wish for a HTML/JS country selector based on shape files with the
> ability to do client "CSS hover-over" type effects (e.g. hover over UK and
> it shows up in RED fill for example) at different zoom levels, as opposed to
> getFeatureInfo requests.  

Tim, if you happen to go at FOSS4G I suggest you follow Tim Schaub
presentation about advances in OpenLayers. Recent OL versions
(unreleased) can eat for GML and KML and present the result as
interactive elements over your map. These can be used to interact
as you like, hovers included, thought I think some javascript wizardry
is still needed to achieve this.

Tim S., anything you may want to add?
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by Mauro Bartolomeoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We just started to develop an HTMLImageMap MapProducer. Maybe we can
join our efforts if you are interested (we'd like to give back our
MapProducer to the community as soon as it's quite complete).
Till now I tried to figure out how to correctly render an HTML ImageMap,
with geometric an non geometric information: our main target is to use
imagemaps as lightweight overlays to raster maps to get tooltips on map
layers.

What I need as WMS output is something like this (just an example):

<map name="NamedPlaces">
    <area shape="poly" id="NamedPlaces.1107531895890"  coords="29,-114
265,-114 265,40 -35,40 -35,6 29,-114" title="Ashton" alt="Ashton" />
    <area shape="poly" id="NamedPlaces.1107531895891"  coords="-3,186
-3,143 83,143 83,186 -3,186" title="Goose Island" alt="Goose Island" />
</map>

I found out that:
 - I cannot use StreamingRenderer on a customized Graphics2D, because
using it I could only render geometries (Correct me if I am wrong).
 - The KML MapProducer is a good place to learn. Our MapProducer is
currently a mix of KML and SVG MapProducers.

Now some questions (to anyone willing to share ideas on the subject):
 - I chose "text/html" as the mimetype for the MapProducer. Do you think
it's correct? Is any other mimetype defined for HTML ImageMaps?
 - I use TextSymbolizer (Label) to render the title and alt attributes
(it's quite powerful, expecially using the geotools filter functions in
SLD). I'd like, in a near future, to render additional textual
attributes (href, onmouseover, etc.). What could be the clearest way to
identify where to render a TextSymbolizer output (to which attribute). I
thought to use different rules with special names identifying the
attribute (something like <Rule><Name>onmouseover</Name>....). Do you
think it's the right way to go?

Thanks,
Mauro Bartolomeoli

meinc wrote:

> Has anyone yet implemented a GeoServer service that is capable of producing
> HTML image maps?
> The only hint on the web I found is that mapbender seems to offer such a
> service, where GML is translated to an HTML Image Map. However, mabpender
> talks PHP, which I don't.
>
> If no such service has yet been implemented, what would be the best way to
> set it up?
> Is it reasoable to realize it as a MapProducer, i.e. add a custom
> GetMapProducerFactorySpi entry?
>
> Since I've absolutely no experience with geo coordinate transformations my
> main problem is
> how to translate the GML coordinates into the corresponding pixel. So my
> first idea was to
> look at the WMS image producers that somehow renders the pixels.
>
> What I found so far was the use of
>
> org.geotools.renderer.lite.LiteShape2 within
> org.geotools.renderer.lite.StreamingRenderer
> which provides in its constructor the magic transformation, i.e.
> decimator.decimateTransformGeneralize(this.geometry,this.mathTransform);
>
> Where may I found more information on how to transform the coordinates to
> pixels?
>
> ~Bob
>
>  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by meinc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andrea,

in the meantime we developed such a plugin at the Fraunhofer Institute IITB / IMT
in the context of an environmental information system. Last Friday I got the OK from
our management that I may give it back to the GeoServer community. How
would be the procedure to do so. Please can you give me some advice.

The plugin is based on GeoTools 2.3.4. The entire package sources, ant build, eclipse project,
dependent libraries are about 9 MB zipped. The plugin itself just consists of two class files.

The plugin is an extension of the WMS service where the format should take the value
"application/clickable".
 It then produces for the given layer the HTML image map contents,e.g.
http://localhost/geoserver/wms?WIDTH=390&HEIGHT=519&SRS=EPSG%3A31467&LAYERS=bw%3AAUSWAHL&STYLES=&FORMAT=application%2Fclickable&TILESORIGIN=3371598.610003352%2C5253151.231935829&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=3375648.8250244893,5215038.765401398,3629148.8250244893,5552388.765401398&cql_Filter=SESSION_NR=%221%22

=>

<area shape="circ" coords="81,413,3" title="FB 30 ETZIBODEN, GOERWIHL" />
...
<area shape="circ" coords="30,406,3" title="QSS HERTINGERQU.1+2, KANDERN" />

So far only circles are supported.
We currently use it for up to 3000 points and it performs quite good.

Regards
Robert


Re: GeoServer HTML ImageMap extension?

by Mauro Bartolomeoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As I wrote in a previous message we also realized a similar plugin, but
we took a different approach,  developing a new GetMapProducer (bound to
the text/html mime type).
The plugin is almost complete (it supports points, areas, linestring and
collections too).
If you're interested (I mean: "the GeoServer community is interested")
we can contribute the plugin/module (it's actually for GeoServer 1.5.3,
I don't know if it's good also for GeoServer 1.6 or  it needs rewriting).
What is the best  way to send our contribution?

Mauro Bartolomeoli

meinc wrote:

> Hi Andrea,
>
> in the meantime we developed such a plugin at the Fraunhofer Institute IITB
> / IMT
> in the context of an environmental information system. Last Friday I got the
> OK from
> our management that I may give it back to the GeoServer community. How
> would be the procedure to do so. Please can you give me some advice.
>
> The plugin is based on GeoTools 2.3.4. The entire package sources, ant
> build, eclipse project,
> dependent libraries are about 9 MB zipped. The plugin itself just consists
> of two class files.
>
> The plugin is an extension of the WMS service where the format should take
> the value
> "application/clickable".
>  It then produces for the given layer the HTML image map contents,e.g.
> http://localhost/geoserver/wms?WIDTH=390&HEIGHT=519&SRS=EPSG%3A31467&LAYERS=bw%3AAUSWAHL&STYLES=&FORMAT=application%2Fclickable&TILESORIGIN=3371598.610003352%2C5253151.231935829&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=3375648.8250244893,5215038.765401398,3629148.8250244893,5552388.765401398&cql_Filter=SESSION_NR=%221%22
>
> =>
>
> <area shape="circ" coords="81,413,3" title="FB 30 ETZIBODEN, GOERWIHL" />
> ...
> <area shape="circ" coords="30,406,3" title="QSS HERTINGERQU.1+2, KANDERN" />
>
> So far only circles are supported.
> We currently use it for up to 3000 points and it performs quite good.
>
> Regards
> Robert
>
>
>  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by aaime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mauro Bartolomeoli ha scritto:
> As I wrote in a previous message we also realized a similar plugin, but
> we took a different approach,  developing a new GetMapProducer (bound to
> the text/html mime type).
> The plugin is almost complete (it supports points, areas, linestring and
> collections too).
> If you're interested (I mean: "the GeoServer community is interested")
> we can contribute the plugin/module (it's actually for GeoServer 1.5.3,
> I don't know if it's good also for GeoServer 1.6 or  it needs rewriting).
> What is the best  way to send our contribution?

In both cases the best way would be to setup a community module: we give
you access to svn and you commit the module in GeoServer.
Ideally it would be nice to have just one that covers both use cases.

What do you think?
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by Mauro Bartolomeoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Andrea Aime wrote:

> Mauro Bartolomeoli ha scritto:
>> As I wrote in a previous message we also realized a similar plugin,
>> but we took a different approach,  developing a new GetMapProducer
>> (bound to the text/html mime type).
>> The plugin is almost complete (it supports points, areas, linestring
>> and collections too).
>> If you're interested (I mean: "the GeoServer community is
>> interested") we can contribute the plugin/module (it's actually for
>> GeoServer 1.5.3, I don't know if it's good also for GeoServer 1.6 or  
>> it needs rewriting).
>> What is the best  way to send our contribution?
>
> In both cases the best way would be to setup a community module: we give
> you access to svn and you commit the module in GeoServer.
> Ideally it would be nice to have just one that covers both use cases.
>
> What do you think?
I agree. I'm not sure how to join our distinct efforts. Maybe we need
some advice by the community on the most useful approach.
Also, I'm quite new to GeoTools/GeoServer programming so we surely need
some review on the code by some expert.

I include some documentation on our plugin at the bottom of the message,
so that you can decide what is good and what is bad and maybe produce a
single unified plugin.

Here is the documentation (any suggestion is appreciated):

HTMLImageMap GetMapProducer 1.0 for GeoServer 1.5.x

USAGE
---------------------------

The HTMLImageMap GetMapProducer adds support for an additional output
format for
WMS GetMap requests. The new format is associated to the "text/html"
mime type
and produces an HTML 4.0 image map as defined by W3C.

Image Maps can be used to cut images in several areas. Each area can
have a link,
title or alt attribute.
 
Request Example.
http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&styles=population&Format=text/
html&request=GetMap&layers=topp:states&width=550&height=250&srs=EPSG:4326
 
Output Example.
<map name="states">
    <area shape="poly" id="states.1.0"  coords="360,120 358,121 357,121
357,122
357,123 357,124 356,124 355,124 354,123 352,123 351,124 351,125 350,124
350,125
349,125 349,124 348,123 348,122 348,121 348,120 348,118 347,118 346,117
345,116
344,116 343,115 342,114 341,113 341,112 341,111 341,110 342,110 342,109
343,108
342,107 340,106 339,107 338,107 338,105 338,104 337,103 336,102 336,102
335,101
333,100 332,99 332,98 331,97 331,96 331,95 331,94 331,93 332,91 332,90
333,90 334,90
334,89 335,88 336,86 335,85 334,84 335,83 336,82 336,82 338,82 339,82
340,81 341,81
341,80 342,79 342,78 342,77 342,76 341,75 340,74 340,73 339,73 338,72
340,72 344,72
349,72 353,72 354,72 358,72 359,72 363,72 362,74 363,75 364,76 364,78
365,80 365,82
365,84 365,85 365,86 365,89 365,91 365,95 365,97 365,100 365,101 365,102
364,103
364,104 364,105 365,106 365,107 365,108 365,109 364,110 364,110 363,111
363,112
362,113 361,113 362,114 361,115 361,116 360,117 360,118 360,119 360,120"
title="IL"/>
    ...
</map>

Each single feature is rendered as one or more area tag. More than one
area tag is
used if the geometry is not compatible with imagemaps constraints, and a
split in
more simple geometries is needed.

An ID attribute is generated for each area tag. The ID is made up of two
parts:
<featureId>.<sequence>, where <featureId> is the id of the feature
containing the
geometry rendered in the tag. Sequence is a sequential number (0,1,2,
...) appended
to the id distinguishing different simple geometries in which the
feature could have
been splitted.

Usage Example.
<img src="..." usemap="#states"/>

STYLING
----------------------------
A little bit of styling is supported through SLD symbolizers. In particular:
 - TextSymbolizers are used to append attributes to the area tags. You
can define a
Label, whose output will be rendered as an attribute value. By default, the
attribute name is "title" (this permits to define tooltips). You can
define several
custom attributes, using different rules, the rule name will be used as
attribute
name (eg.
<Rule>...<Name>href</Name>...<TextSymbolizer>...</TextSymbolizer>...</Rule>
defines
an href attribute, binding links to the rendered areas).
 - LineSymbolizers stroke-width parameter is used to define a buffer along
linestrings (defaults to 2px if not defined).
 - PointSymbolizers Size is used to define circle radius for rendered
points
(currently only Marks with a WellKnownName of "circle" are
   supported).
 
Examples.

1) Point with a label attached as title attribute ("ADDRESS: <...>").
The point is
rendered as 6px radius circle.

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"    
    xsi:schemaLocation="http://www.opengis.net/sld 
StyledLayerDescriptor.xsd"    
    xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
     xmlns:xlink="http://www.w3.org/1999/xlink"    
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <UserStyle>
        <Name>Default Styler</Name>
        <Title>Default Styler</Title>
        <Abstract/>
        <FeatureTypeStyle>
            <FeatureTypeName>Feature</FeatureTypeName>
            <Rule>
                <Name>title</Name>
                <Title>all</Title>
                <PointSymbolizer>
                    <Graphic>
                        <Mark>
                            <WellKnownName>circle</WellKnownName>
                            <Stroke>
                                <CssParameter
name="stroke">#0000ff</CssParameter>
                            </Stroke>
                        </Mark>
                        <Size>6</Size>
                        <Opacity>1</Opacity>
                    </Graphic>
                </PointSymbolizer>
                <TextSymbolizer>
                    <Label>
                        <Function name="strConcat">
                            <Literal>ADDRESS: </Literal>
                            <PropertyName>ADDRESS</PropertyName>
                        </Function>
                    </Label>
                </TextSymbolizer>
            </Rule>
        </FeatureTypeStyle>
    </UserStyle>
</StyledLayerDescriptor>

2) LineStrings rendered with a buffer of 4px.

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld 
StyledLayerDescriptor.xsd"
    xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <UserStyle>
        <Name>Default Styler</Name>
        <Title>Default Styler</Title>
        <Abstract></Abstract>
        <FeatureTypeStyle>
            <FeatureTypeName>Feature</FeatureTypeName>
            <Rule>
                <Name>title</Name>
                <Title>Roads</Title>              
                <LineSymbolizer>
                    <Stroke>                      
                        <CssParameter name="stroke-width">
                            <ogc:Literal>4</ogc:Literal>
                        </CssParameter>
                    </Stroke>
                </LineSymbolizer>
            </Rule>
           
        </FeatureTypeStyle>
    </UserStyle>
</StyledLayerDescriptor>

3) GeometryCollection where LineStrings are rendered with a buffer of 4px,
points as circles with 6px radius, any geometry has an attribute href whose
value is given by the DESCRIPTION feature attribute.

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld 
StyledLayerDescriptor.xsd"
    xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <UserStyle>
        <Name>Default Styler</Name>
        <Title>Default Styler</Title>
        <Abstract></Abstract>
        <FeatureTypeStyle>
            <FeatureTypeName>Feature</FeatureTypeName>
            <Rule>
                <Name>href</Name>
                <Title>all</Title>              
                <LineSymbolizer>
                    <Stroke>                      
                        <CssParameter name="stroke-width">
                            <ogc:Literal>4</ogc:Literal>
                        </CssParameter>
                    </Stroke>
                </LineSymbolizer>
                <PointSymbolizer>
                    <Graphic>
                        <Mark>
                            <WellKnownName>circle</WellKnownName>
                            <Stroke>
                                <CssParameter
name="stroke">#0000ff</CssParameter>
                            </Stroke>
                        </Mark>
                        <Size>6</Size>
                        <Opacity>1</Opacity>
                    </Graphic>
                </PointSymbolizer>
                <TextSymbolizer>
                    <Label>
                        <PropertyName>DESCRIPTION</PropertyName>
                    </Label>
                </TextSymbolizer>
            </Rule>
           
        </FeatureTypeStyle>
    </UserStyle>
</StyledLayerDescriptor>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by aaime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mauro Bartolomeoli ha scritto:

>
>
> Andrea Aime wrote:
>> Mauro Bartolomeoli ha scritto:
>>> As I wrote in a previous message we also realized a similar plugin,
>>> but we took a different approach,  developing a new GetMapProducer
>>> (bound to the text/html mime type).
>>> The plugin is almost complete (it supports points, areas, linestring
>>> and collections too).
>>> If you're interested (I mean: "the GeoServer community is
>>> interested") we can contribute the plugin/module (it's actually for
>>> GeoServer 1.5.3, I don't know if it's good also for GeoServer 1.6 or  
>>> it needs rewriting).
>>> What is the best  way to send our contribution?
>>
>> In both cases the best way would be to setup a community module: we give
>> you access to svn and you commit the module in GeoServer.
>> Ideally it would be nice to have just one that covers both use cases.
>>
>> What do you think?
> I agree. I'm not sure how to join our distinct efforts. Maybe we need
> some advice by the community on the most useful approach.

All in all your approach seems more complete, so it may make sense
to try to add

> Also, I'm quite new to GeoTools/GeoServer programming so we surely need
> some review on the code by some expert.
>
> I include some documentation on our plugin at the bottom of the message,
> so that you can decide what is good and what is bad and maybe produce a
> single unified plugin.
>
> Here is the documentation (any suggestion is appreciated):
>
> HTMLImageMap GetMapProducer 1.0 for GeoServer 1.5.x
>
> USAGE
> ---------------------------
>
> The HTMLImageMap GetMapProducer adds support for an additional output
> format for
> WMS GetMap requests. The new format is associated to the "text/html"
> mime type
> and produces an HTML 4.0 image map as defined by W3C.

I looked around, could not find an official "imagemap" mime type...
given that imagemaps are in fact part of html, it seems it makes
sense to have them be "text/html".
So it means you're producing a full blown html page right?
Do you present it to the user as is, or do some javascript wizardry
to merge it with another html page?

> Image Maps can be used to cut images in several areas. Each area can
> have a link,
> title or alt attribute.
>
> Request Example.
> http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&styles=population&Format=text/ 
>
> html&request=GetMap&layers=topp:states&width=550&height=250&srs=EPSG:4326
>
> Output Example.
> <map name="states">
>    <area shape="poly" id="states.1.0"  coords="360,120 358,121 357,121
> 357,122
> 357,123 357,124 356,124 355,124 354,123 352,123 351,124 351,125 350,124
> 350,125
> 349,125 349,124 348,123 348,122 348,121 348,120 348,118 347,118 346,117
> 345,116
> 344,116 343,115 342,114 341,113 341,112 341,111 341,110 342,110 342,109
> 343,108
> 342,107 340,106 339,107 338,107 338,105 338,104 337,103 336,102 336,102
> 335,101
> 333,100 332,99 332,98 331,97 331,96 331,95 331,94 331,93 332,91 332,90
> 333,90 334,90
> 334,89 335,88 336,86 335,85 334,84 335,83 336,82 336,82 338,82 339,82
> 340,81 341,81
> 341,80 342,79 342,78 342,77 342,76 341,75 340,74 340,73 339,73 338,72
> 340,72 344,72
> 349,72 353,72 354,72 358,72 359,72 363,72 362,74 363,75 364,76 364,78
> 365,80 365,82
> 365,84 365,85 365,86 365,89 365,91 365,95 365,97 365,100 365,101 365,102
> 364,103
> 364,104 364,105 365,106 365,107 365,108 365,109 364,110 364,110 363,111
> 363,112
> 362,113 361,113 362,114 361,115 361,116 360,117 360,118 360,119 360,120"
> title="IL"/>
>    ...
> </map>
>
> Each single feature is rendered as one or more area tag. More than one
> area tag is
> used if the geometry is not compatible with imagemaps constraints, and a
> split in
> more simple geometries is needed.

Good. A possible improvement would be to generalize the geometries even
further to reduce the size of the image map (just an idea).

> An ID attribute is generated for each area tag. The ID is made up of two
> parts:
> <featureId>.<sequence>, where <featureId> is the id of the feature
> containing the
> geometry rendered in the tag. Sequence is a sequential number (0,1,2,
> ...) appended
> to the id distinguishing different simple geometries in which the
> feature could have
> been splitted.
>
> Usage Example.
> <img src="..." usemap="#states"/>
>
> STYLING
> ----------------------------
> A little bit of styling is supported through SLD symbolizers. In
> particular:
> - TextSymbolizers are used to append attributes to the area tags. You
> can define a
> Label, whose output will be rendered as an attribute value. By default, the
> attribute name is "title" (this permits to define tooltips). You can
> define several
> custom attributes, using different rules, the rule name will be used as
> attribute
> name (eg.
> <Rule>...<Name>href</Name>...<TextSymbolizer>...</TextSymbolizer>...</Rule>
> defines
> an href attribute, binding links to the rendered areas).

Nice!

> - LineSymbolizers stroke-width parameter is used to define a buffer along
> linestrings (defaults to 2px if not defined).
> - PointSymbolizers Size is used to define circle radius for rendered points
> (currently only Marks with a WellKnownName of "circle" are
>   supported).

So this covers the case Robert was talking about already?

It seems quite full featured and well integrated in the way GeoServer
does things. Can I have a look at the code? Anyways, I will try to
get you commit access... once this is in svn Robert can have a look
at it as well and see if his use case is properly covered, compare
the performance and see if it's up to his requirements and so on.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by meinc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>So this covers the case Robert was talking about already?
>
>It seems quite full featured and well integrated in the way GeoServer
>does things. Can I have a look at the code? Anyways, I will try to
>get you commit access... once this is in svn Robert can have a look
>at it as well and see if his use case is properly covered, compare
>the performance and see if it's up to his requirements and so on.

It really seems to cover our use case and I'm curious to see it work.
If you are still interested to see our code I'm prepared to provide it
(source only, full, whatever makes sense) just let me know if and how.

Robert

Re: GeoServer HTML ImageMap extension?

by Mauro Bartolomeoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just uploaded a zip file with the source as a Jira issue (you can find the link in a previous message).
I'm surely interested to see your code and merging anything useful or wrong in my plugin. Maybe you can attach your code to the same Jira issue, so the community can look at both our efforts.

Thanks,
Mauro Bartolomeoli


meinc wrote:
So this covers the case Robert was talking about already?

It seems quite full featured and well integrated in the way GeoServer 
does things. Can I have a look at the code? Anyways, I will try to
get you commit access... once this is in svn Robert can have a look
at it as well and see if his use case is properly covered, compare
the performance and see if it's up to his requirements and so on.
    

It really seems to cover our use case and I'm curious to see it work.
If you are still interested to see our code I'm prepared to provide it
(source only, full, whatever makes sense) just let me know if and how.

Robert
  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Re: GeoServer HTML ImageMap extension?

by meinc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>I just uploaded a zip file with the source as a Jira issue (you can find
>>the link in a previous message).
>>I'm surely interested to see your code and merging anything useful or
>>wrong in my plugin. Maybe you can attach your code to the same Jira
>>issue, so the community can look at both our efforts.

just did so.
Robert Saenger

Re: GeoServer HTML ImageMap extension?

by Mauro Bartolomeoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, I'll take a look at it as soon as possible.

meinc wrote:
I just uploaded a zip file with the source as a Jira issue (you can find 
the link in a previous message).
I'm surely interested to see your code and merging anything useful or 
wrong in my plugin. Maybe you can attach your code to the same Jira 
issue, so the community can look at both our efforts.
      

just did so.
Robert Saenger
  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
LightInTheBox - Buy quality products at