Menu

#228 visualisation

open
nobody
None
5
2015-12-06
2015-10-25
No

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

Related

Feature Requests: #228

Discussion

  • michael michaud

    michael michaud - 2015-10-25

    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.

    • choose ColorThemingStylePanel
    • choose an attribute and a classification method
    • in first column, you have small comboboxes to change color for each value (or range of values), and if you scroll up the list, you have a "customize" item which makes it possible to change any parameter of the basic style associated with the attribute 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();

     
    • Loukas Georges Geargeoura

      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:

      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.
      * choose ColorThemingStylePanel
      * choose an attribute and a classification method
      * in first column, you have small comboboxes to change color for each
      value (or range of values), and if you scroll up the list, you have a
      "customize" item which makes it possible to change any parameter of the
      basic style associated with the attribute 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();


      Status: open
      Created: Sun Oct 25, 2015 03:45 PM UTC by Loukas Georges Geargeoura
      Last Updated: Sun Oct 25, 2015 03:45 PM UTC
      Owner: nobody

      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

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jump-pilot/feature-requests/228/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #228

  • michael michaud

    michael michaud - 2015-12-06

    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 ?

     
    • Loukas Georges Geargeoura

      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

      Le 2015-12-06 à 10:42, michael michaud michaudm@users.sf.net a écrit :

      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 ?

      [feature-requests:#228] visualisation

      Status: open
      Created: Sun Oct 25, 2015 03:45 PM UTC by Loukas Georges Geargeoura
      Last Updated: Sun Oct 25, 2015 10:28 PM UTC
      Owner: nobody

      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

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jump-pilot/feature-requests/228/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #228

    • Loukas Georges Geargeoura

      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:

      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 ?


      Status: open
      Created: Sun Oct 25, 2015 03:45 PM UTC by Loukas Georges Geargeoura
      Last Updated: Sun Oct 25, 2015 10:28 PM UTC
      Owner: nobody

      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

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jump-pilot/feature-requests/228/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #228


Log in to post a comment.

MongoDB Logo MongoDB