From: Jesse E. <je...@re...> - 2005-12-14 22:14:23
|
I have a bit of a issue with lines drawn with a Graphic stroke. I've looked at the SLD specification on how it is supposed to be done and I haven't really gotten a good answer but here is what it does and what I think it should do: What it does: Between each set of coordinates the graphic is drawn. If the distance between the two coordinates is longer than the graphic then the graphic is repeated until the space if filled up. So far this is more or less ok. However if the distance between coordinates is less than the length of the graphic then the graphic is clipped so that it fits. Because of this when you zoom out the graphic is unrecognizable. Image a line with an arrow. If you zoom in the arrow can be seen with no difficulty but if you zoom out it looks like a line (the arrow is lost). What I expected: I expected the arrow to show up independent of what zoom level I am at. A weather map is a good point. I have weather front with arrows indicating the direction they are moving. The direction the arrow points is dependent on the order of the coordinates so a graphic stoke would work perfectly... Unfortunately if I look at all of canada it just looks like a line. I have to zoom in to see the arrows. This is not what is desired. I am going to make a new implementation of StyledShapePainter for my use in this project. And can add it to geotools if it is the behaviour that other expect as well. However if there is a better way to do what I want please let me know before I do too much work. Thanks, Jesse |
From: Brent O. <bre...@gm...> - 2005-12-14 22:34:26
|
I would expect the graphics to act the way they are currently acting. An arrow is a special case, where you don't want part of the graphic to change (arrow head), but you want the rest to adjust (the line). I suggest making a special arrow type that will behave the way you want it to. Or, reversing the points and having a reversed arrow graphic. Brent Owens TOPP Jesse Eichar wrote: > I have a bit of a issue with lines drawn with a Graphic stroke. I've > looked at the SLD specification on how it is supposed to be done and I > haven't really gotten a good answer but here is what it does and what > I think it should do: > > What it does: > Between each set of coordinates the graphic is drawn. If the distance > between the two coordinates is longer than the graphic then the > graphic is repeated until the space if filled up. So far this is more > or less ok. However if the distance between coordinates is less than > the length of the graphic then the graphic is clipped so that it > fits. Because of this when you zoom out the graphic is > unrecognizable. Image a line with an arrow. If you zoom in the arrow > can be seen with no difficulty but if you zoom out it looks like a > line (the arrow is lost). > > What I expected: > I expected the arrow to show up independent of what zoom level I am > at. A weather map is a good point. I have weather front with arrows > indicating the direction they are moving. The direction the arrow > points is dependent on the order of the coordinates so a graphic stoke > would work perfectly... Unfortunately if I look at all of canada it > just looks like a line. I have to zoom in to see the arrows. This > is not what is desired. > I am going to make a new implementation of StyledShapePainter for my > use in this project. And can add it to geotools if it is the > behaviour that other expect as well. However if there is a better way > to do what I want please let me know before I do too much work. > > Thanks, > Jesse > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > |
From: Jesse E. <je...@re...> - 2005-12-14 22:39:33
|
The arrow is in the middle of the graphic, so reversing it doesn't help. I don't think it is a special case though. Suppose you are drawing happy faces. When you zoom out you wouldn't see any happy faces. What basically always happens is the line becomes an image that is a single pixel long but maybe quite wide, depending on the graphic. So it doesn't really matter what the image is it is always cut-off when you zoom out. Even if it is a simple pattern of blue line followed by a red line. When you zoom out it becomes a blue line. Jesse Brent Owens wrote: > I would expect the graphics to act the way they are currently acting. > An arrow is a special case, where you don't want part of the graphic > to change (arrow head), but you want the rest to adjust (the line). I > suggest making a special arrow type that will behave the way you want > it to. Or, reversing the points and having a reversed arrow graphic. > > Brent Owens > TOPP > > > > Jesse Eichar wrote: > >> I have a bit of a issue with lines drawn with a Graphic stroke. I've >> looked at the SLD specification on how it is supposed to be done and >> I haven't really gotten a good answer but here is what it does and >> what I think it should do: >> >> What it does: >> Between each set of coordinates the graphic is drawn. If the >> distance between the two coordinates is longer than the graphic then >> the graphic is repeated until the space if filled up. So far this is >> more or less ok. However if the distance between coordinates is less >> than the length of the graphic then the graphic is clipped so that it >> fits. Because of this when you zoom out the graphic is >> unrecognizable. Image a line with an arrow. If you zoom in the >> arrow can be seen with no difficulty but if you zoom out it looks >> like a line (the arrow is lost). >> >> What I expected: >> I expected the arrow to show up independent of what zoom level I am >> at. A weather map is a good point. I have weather front with arrows >> indicating the direction they are moving. The direction the arrow >> points is dependent on the order of the coordinates so a graphic >> stoke would work perfectly... Unfortunately if I look at all of >> canada it just looks like a line. I have to zoom in to see the >> arrows. This is not what is desired. >> I am going to make a new implementation of StyledShapePainter for my >> use in this project. And can add it to geotools if it is the >> behaviour that other expect as well. However if there is a better >> way to do what I want please let me know before I do too much work. >> >> Thanks, >> Jesse >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. Do you grep through >> log files >> for problems? Stop! Download the new AJAX search engine that makes >> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >> _______________________________________________ >> Geotools-devel mailing list >> Geo...@li... >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> |
From: Brent O. <bre...@gm...> - 2005-12-14 23:03:22
|
Maybe an added "fit" tag could do it. Where the image is stretched (shrunk) to fit the line length when the image is too large for the line, and then tiled when the image is smaller than the line length. Of course a single pixel representing a line breaks this, and most solutions I believe. A possibility would be to have the full image, a portion of the image, or a different image altogether, displayed when the line turns into a point (because of zooming out). That way when your line shrinks, your graphic could turn into just an arrow head, instead of an arrow head plus a line tail. The idea of a line graphic does not work for a point geometry, because the line graphic is designed for a line. Maybe an alternate lower-dimentionality image substitute would work. Brent Owens TOPP Jesse Eichar wrote: > The arrow is in the middle of the graphic, so reversing it doesn't > help. I don't think it is a special case though. Suppose you are > drawing happy faces. When you zoom out you wouldn't see any happy > faces. What basically always happens is the line becomes an image > that is a single pixel long but maybe quite wide, depending on the > graphic. So it doesn't really matter what the image is it is always > cut-off when you zoom out. Even if it is a simple pattern of blue > line followed by a red line. When you zoom out it becomes a blue line. > > Jesse > > Brent Owens wrote: > >> I would expect the graphics to act the way they are currently acting. >> An arrow is a special case, where you don't want part of the graphic >> to change (arrow head), but you want the rest to adjust (the line). I >> suggest making a special arrow type that will behave the way you want >> it to. Or, reversing the points and having a reversed arrow graphic. >> >> Brent Owens >> TOPP >> >> >> >> Jesse Eichar wrote: >> >>> I have a bit of a issue with lines drawn with a Graphic stroke. >>> I've looked at the SLD specification on how it is supposed to be >>> done and I haven't really gotten a good answer but here is what it >>> does and what I think it should do: >>> >>> What it does: >>> Between each set of coordinates the graphic is drawn. If the >>> distance between the two coordinates is longer than the graphic then >>> the graphic is repeated until the space if filled up. So far this >>> is more or less ok. However if the distance between coordinates is >>> less than the length of the graphic then the graphic is clipped so >>> that it fits. Because of this when you zoom out the graphic is >>> unrecognizable. Image a line with an arrow. If you zoom in the >>> arrow can be seen with no difficulty but if you zoom out it looks >>> like a line (the arrow is lost). >>> >>> What I expected: >>> I expected the arrow to show up independent of what zoom level I am >>> at. A weather map is a good point. I have weather front with >>> arrows indicating the direction they are moving. The direction the >>> arrow points is dependent on the order of the coordinates so a >>> graphic stoke would work perfectly... Unfortunately if I look at all >>> of canada it just looks like a line. I have to zoom in to see the >>> arrows. This is not what is desired. >>> I am going to make a new implementation of StyledShapePainter for my >>> use in this project. And can add it to geotools if it is the >>> behaviour that other expect as well. However if there is a better >>> way to do what I want please let me know before I do too much work. >>> >>> Thanks, >>> Jesse >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. Do you grep through >>> log files >>> for problems? Stop! Download the new AJAX search engine that makes >>> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >>> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >>> _______________________________________________ >>> Geotools-devel mailing list >>> Geo...@li... >>> https://lists.sourceforge.net/lists/listinfo/geotools-devel >>> > > |
From: Jesse E. <je...@re...> - 2005-12-14 23:08:21
|
OK thanks for the suggestions I'll play around with those options for now. Don't worry I'm going to leave the code base alone and play with it more until I have a solution rather than just a problem and If I come up with something good I'll post that up and see what people think. Jesse Brent Owens wrote: > Maybe an added "fit" tag could do it. Where the image is stretched > (shrunk) to fit the line length when the image is too large for the > line, and then tiled when the image is smaller than the line length. > Of course a single pixel representing a line breaks this, and most > solutions I believe. > > A possibility would be to have the full image, a portion of the image, > or a different image altogether, displayed when the line turns into a > point (because of zooming out). That way when your line shrinks, your > graphic could turn into just an arrow head, instead of an arrow head > plus a line tail. The idea of a line graphic does not work for a point > geometry, because the line graphic is designed for a line. Maybe an > alternate lower-dimentionality image substitute would work. > > Brent Owens > TOPP > > > > Jesse Eichar wrote: > >> The arrow is in the middle of the graphic, so reversing it doesn't >> help. I don't think it is a special case though. Suppose you are >> drawing happy faces. When you zoom out you wouldn't see any happy >> faces. What basically always happens is the line becomes an image >> that is a single pixel long but maybe quite wide, depending on the >> graphic. So it doesn't really matter what the image is it is always >> cut-off when you zoom out. Even if it is a simple pattern of blue >> line followed by a red line. When you zoom out it becomes a blue line. >> >> Jesse >> >> Brent Owens wrote: >> >>> I would expect the graphics to act the way they are currently >>> acting. An arrow is a special case, where you don't want part of the >>> graphic to change (arrow head), but you want the rest to adjust (the >>> line). I suggest making a special arrow type that will behave the >>> way you want it to. Or, reversing the points and having a reversed >>> arrow graphic. >>> >>> Brent Owens >>> TOPP >>> >>> >>> >>> Jesse Eichar wrote: >>> >>>> I have a bit of a issue with lines drawn with a Graphic stroke. >>>> I've looked at the SLD specification on how it is supposed to be >>>> done and I haven't really gotten a good answer but here is what it >>>> does and what I think it should do: >>>> >>>> What it does: >>>> Between each set of coordinates the graphic is drawn. If the >>>> distance between the two coordinates is longer than the graphic >>>> then the graphic is repeated until the space if filled up. So far >>>> this is more or less ok. However if the distance between >>>> coordinates is less than the length of the graphic then the graphic >>>> is clipped so that it fits. Because of this when you zoom out the >>>> graphic is unrecognizable. Image a line with an arrow. If you >>>> zoom in the arrow can be seen with no difficulty but if you zoom >>>> out it looks like a line (the arrow is lost). >>>> >>>> What I expected: >>>> I expected the arrow to show up independent of what zoom level I am >>>> at. A weather map is a good point. I have weather front with >>>> arrows indicating the direction they are moving. The direction the >>>> arrow points is dependent on the order of the coordinates so a >>>> graphic stoke would work perfectly... Unfortunately if I look at >>>> all of canada it just looks like a line. I have to zoom in to see >>>> the arrows. This is not what is desired. >>>> I am going to make a new implementation of StyledShapePainter for >>>> my use in this project. And can add it to geotools if it is the >>>> behaviour that other expect as well. However if there is a better >>>> way to do what I want please let me know before I do too much work. >>>> >>>> Thanks, >>>> Jesse >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.net email is sponsored by: Splunk Inc. Do you grep through >>>> log files >>>> for problems? Stop! Download the new AJAX search engine that makes >>>> searching your log files as easy as surfing the web. DOWNLOAD >>>> SPLUNK! >>>> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >>>> _______________________________________________ >>>> Geotools-devel mailing list >>>> Geo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/geotools-devel >>>> >> >> |
From: Jody G. <jga...@re...> - 2005-12-14 23:09:21
|
Brent Owens wrote: > Maybe an added "fit" tag could do it. Where the image is stretched > (shrunk) to fit the line length when the image is too large for the > line, and then tiled when the image is smaller than the line length. > Of course a single pixel representing a line breaks this, and most > solutions I believe. I don't think we need to think on this one - what does the spec say? MapServer bends graphics along a line ... making nice looking roads and "pipes". > A possibility would be to have the full image, a portion of the image, > or a different image altogether, displayed when the line turns into a > point (because of zooming out). That way when your line shrinks, your > graphic could turn into just an arrow head, instead of an arrow head > plus a line tail. The idea of a line graphic does not work for a point > geometry, because the line graphic is designed for a line. Maybe an > alternate lower-dimentionality image substitute would work. By arrow Jesse means something like: ____/\____/\_____/\_____/\_____ Rather then: =======================> Here let me look it up for you guys: > There are three basic types of strokes: solid-color, GraphicFill > (stipple), and repeated linear GraphicStroke. A repeated linear > graphic is plotted linearly and has its graphic symbol bent around the > curves of the line string, and a graphic fill has the pixels of the > line rendered with a repeating area-fill pattern. If neither a > GraphicFill nor GraphicStroke element is given, then the line > symbolizer will render a solid color. Later, Jody |
From: Ian T. <ijt...@gm...> - 2005-12-15 14:54:25
|
On 12/14/05, Jesse Eichar <je...@re...> wrote: > > I have a bit of a issue with lines drawn with a Graphic stroke. I've > looked at the SLD specification on how it is supposed to be done and I > haven't really gotten a good answer but here is what it does and what I > think it should do: > > What I expected: > I expected the arrow to show up independent of what zoom level I am at. > A weather map is a good point. I have weather front with arrows > indicating the direction they are moving. The direction the arrow > points is dependent on the order of the coordinates so a graphic stoke > would work perfectly... Unfortunately if I look at all of canada it just > looks like a line. I have to zoom in to see the arrows. This is not > what is desired. GeoTools defines an arrow mark which will draw independant of scale and I'm fairly sure that graphic strokes should do the same now that I think about it. Currently all SLD sizes are in pixels, though with the new version ther= e is a move to allowing the specification of real world units. In this case though I'd go with the mark with the graphic as backup since the mark will look nicer at odd rotations since its a vector. Ian -- Ian Turton http://www.geotools.org |