RE: [Geoserver-users] Drawing a line between two features & Labelling a feature

Hi,

Another question on the example given in
http://docs.codehaus.org/display/GEOSDOC/InlineFeature. There is this
<BodyPart> tag. Can I know where and how this tag is declared? I tried doing
something similar in my request but I ended up getting this error for the
tag <HistoryLine> I put in:

java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in
escape (%) pattern - For input string: "Hi"

Thanks.

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: Lee Wai See [mailto:leewse@anonymised.com]
Sent: Thursday, March 09, 2006 12:02 PM
To: 'Brent Owens'
Cc: 'geoserver-users@lists.sourceforge.net'
Subject: RE: [Geoserver-users] Drawing a line between two features &
Labelling a feature

Hi,

Following the example in
http://docs.codehaus.org/display/GEOSDOC/ComplexLabelingExample, I did a
getMap request for an inline feature. However, I encounter a
ServiceException that says the following:
org.xml.sax.SAXParseException: XML document structures must start and end
within the same entity.

Could someone be kind enough to point out where I have gone wrong (my
request is as below)? I understand that it might be tedious to read the
chunk but as I am still playing around with inline feature, so would greatly
appreciate any help. Thanks.

http://localhost:8080/geoserver/wms?bbox=103.59736493356376,1.17866724157080
97,104.09707604959173,1.4807073969316509&Format=image/png&request=GetMap&wid
th=800&height=400&srs=EPSG:4326&SLD_BODY=
<StyledLayerDescriptor version="1.0.0">
  <UserLayer>
    <Name>Inline</Name>
    <InlineFeature>
      <FeatureCollection>
        <featureMember>
          <gml:LineString>
      <gml:coordinates>103.94479827880852,1.325985083
103.91832203784215,1.307173827
      </gml:coordinates>
          </gml:LineString>
        </featureMember>
      </FeatureCollection>
    </InlineFeature>
    <UserStyle>
      <FeatureTypeStyle>
        <Rule>
        <LineSymbolizer>
          <Stroke>
          <CssParameter name="stroke">
          <ogc:Literal>#0000FF</ogc:Literal>
          </CssParameter>
          <CssParameter name="stroke-width">
          <ogc:Literal>2</ogc:Literal>
          </CssParameter>
          </Stroke>
        </LineSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </UserLayer>
</StyledLayerDescriptor>

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: Brent Owens [mailto:brentowens@anonymised.com]
Sent: Thursday, March 02, 2006 3:25 PM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Drawing a line between two features &
Labelling a feature

Hi,

You will first need to create the lines from the points you receive. The
line just has to be made of two of the points: start point and end
point. Then you need to format those lines into GML:

<gml:LineString>
  <gml:coordinates>x1,y1 x2,y2</gml:coordinates>
</gml:LineString>

Then you will send a new SLD back to Geoserver, with a getmap request, that
has the inline features. (follow this tutorial but change the polygons to
linestrings: http://docs.codehaus.org/display/GEOSDOC/InlineFeature).
You will get back the correct map that has the lines drawn between the
points.

So to summarize how it will work:
1) client -> geoserver: normal get feature request
2) client <- geoserver: gml of the point fetures
3) client: build up lines from the returned points
4) client: create SLD with inline features containing the lines
5) client -> geoserver: getMap SLD post request with the new SLD file
6) client <- geoserver: map with the lines drawn in it

In the <UserSytle> section of the SLD you will have to point to the inline
feature names.
I haven't played around with inline features much, so you will have to
tinker and play with the tutorial to get it working.

Brent Owens
(The Open Planning Project)

Lee Wai See wrote:

Hi,

I went through the tutorials but am still not sure how I can apply the
inline feature to my implementation.

To be more precise, the map I retrieved using the following request

returns

me a layer with four features (as shown in the attachment, if it can be
received by the mailing list). How can I actually change the SLD below

such

that I can draw lines that joins up the four features (again, shown as red
lines in the attachment if it's viewable)? How can I use the inline

feature

to do that?

http://localhost:8080/geoserver/wms?bbox=103.59736493356376,1.17866724157080

97,104.09707604959173,1.4807073969316509&Format=image/png&request=GetMap&wid

th=800&height=400&srs=EPSG:4326&SLD_BODY=
<StyledLayerDescriptor version="1.0.0">
  <UserLayer>
    <Name>prrm:history_track</Name>
    <UserStyle>
      <Title>Default Styler</Title>
      <Abstract></Abstract>
      <FeatureTypeStyle>
        <FeatureTypeName>Feature</FeatureTypeName>
        <Rule>
        <Filter
xmlns:gml="http://www.opengis.net/gml&quot;&gt;
          <PropertyIsEqualTo>
  
<PropertyName>vehicle_number</PropertyName>
          <Literal>SGD7575D</Literal>
          </PropertyIsEqualTo>
        </Filter>
        <PointSymbolizer>
          <Graphic>
            <Mark>
  
<WellKnownName>triangle</WellKnownName>
            <Fill>
            <CssParameter
name="fill">%23F000000</CssParameter>
            </Fill>
            </Mark>
            <Size>10.0</Size>
          </Graphic>
        </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </UserLayer>
</StyledLayerDescriptor>

Thank you.

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Brent
Owens
Sent: Wednesday, March 01, 2006 2:33 PM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Drawing a line between two features &
Labelling a feature

There are a couple ways you can do this. Are these line features that
you wish to draw going to be permanent, or just temporary?

If you want them to be in the dataset permanently, then just use a WFS
request and insert the feature. But if you want it just as a dynamic,
temporary, feature then you can draw the line using an SLD post request
with an inline feature. Here are a couple of tutorials on inline
features using SLD post:
http://docs.codehaus.org/display/GEOSDOC/InlineFeature
http://docs.codehaus.org/display/GEOSDOC/InLineFeature+Usage

Brent Owens
(The Open Planning Project)

Lee Wai See wrote:
  

Hi,

I have features on a map layer:

   1. Is it possible for me to draw a line from one feature to
      another, that is, drawing a line between two features?

   2. Is it possible to attach a label to a feature?

How can I go about doing these two implementations? Is it possible for
me to do it through requests sent to the GeoServer? Any references
would be greatly appreciated. Thank you.

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the
    

message
  

from your system; please do not copy or use it for any purpose, nor
    

disclose
  

its contents to any other person. Thank you.]
---ST Electronics Group---

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting

language

that extends applications into web and mobile media. Attend the live

webcast

and join the prime developer group breaking into this new coding

territory!

http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  
------------------------------------------------------------------------