Hi,
I am preparing a map that contains traffic information on a road network, more specifically the traffic flow on a specific link which shows where the flow is coming from and what are the destinations from the specific link. At the present time, the traffic flows are indicated on the map (numerical value) and I would like to visualize these results better by showing the thickness of the link proportional to the traffic flow and to eliminate all values equal to zero on the map. I tried to modify the color attribute scheme but havent obtained the results I want yet. Any help or tips would be much apprecitated. Thank you.
loukas
Hi Loukas,
This feature does not exist in OpenJUMP yet.
But you can get the result you want with a bit of patience.
1st solution : In ColorThemingStyle, you can customize styles associated with each value.
2nd solution : write a script with the beanshell editor. Here is an example which should be easy to customize for your need (change the attribute name to fit your need):
// ----------------------------
// Script to display line width
// according to an attribute of
// type integer
// ----------------------------
import com.vividsolutions.jump.workbench.ui.renderer.style.*;
att = "myattribute";
// Work on selected layer
lyr = wc.layerNamePanel.selectedLayers[0];
// Get the current basic style
bstyle = lyr.getBasicStyle();
// Loop through feature's attribute to fill
// a map of BasicStyle with different widths
map = new HashMap();
for (f : lyr.featureCollectionWrapper.features) {
style = bstyle.clone();
style.setLineWidth(f.getAttribute(att));
map.put(f.getAttribute(att), style);
}
// Create the new ColorThemingStyle
style = new ColorThemingStyle(att, map, bstyle);
style.setEnabled(true);
// Replace previous ColorThemingStyle by new one
lyr.removeStyle(lyr.getStyle(ColorThemingStyle.class));
lyr.addStyle(style);
wc.layerViewPanel.repaint();
Hi Michael,
I managed to eliminate the decimals of the values on the printscreen below
but I would like to eliminate all values equal to zero as well. Do you know
how I can do this?
Thanks for the info and your help.
Loukas
On Sun, Oct 25, 2015 at 6:28 PM, michael michaud michaudm@users.sf.net
wrote:
Related
Feature Requests: #228
Sorry, I answered on the mailing list instead of the forum :
Can you elaborate ? I'm not sure what you want to hide exactly
and which method you are using.
Are you adjusting your styles manually ? Did you use the script ?
Can you send a screen capture of what you get and what you would like to get ?
Hi Michael,
I would like to hide all values equal to zero on the image sent last Thursday in order to show useful information only on the map (traffic flow higher than 0 on the different links of the road network). Thank you.
Loukas
Related
Feature Requests: #228
Hi Michael,
Here is a printscreen of what I would like to get, basically see on the map
the values of traffic flow therefore not see any zero values which take up
a large part of the map. Thank you.
Loukas
On Sun, Dec 6, 2015 at 11:42 AM, michael michaud michaudm@users.sf.net
wrote:
Related
Feature Requests: #228