jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoTools
  • GEOT-382

StyleBuilder.LINE_CAP_ROUND

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 2.0.0
  • Fix Version/s: 2.6.3
  • Component/s: unsupported
  • Labels:
    None
  • Environment:
    JDK 1.4.2_05, Windows XP Home Edition, GeoTools 2.0

Description

The geometry property (with this java code) not work:
The line in shape file is hide.
StyleBuilder builder = new StyleBuilder();
LineSymbolizer ls = builder.createLineSymbolizer(Color.BLACK, 10, StyleBuilder.LINE_CAP_ROUND);

Style style= builder.createStyle();
style.addFeatureTypeStyle(builder.createFeatureTypeStyle(null, builder.createRule(ls)));

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    GeFlotte.java
    24/Jan/05 5:58 AM
    2 kB
    Carlo Camusso
  2. Hide
    Zip Archive
    Roma_polyline.zip
    24/Jan/05 6:00 AM
    161 kB
    Carlo Camusso
    1. File
      Roma_polyline.shx 24 kB
    2. File
      Roma_polyline.ssx 117 kB
    3. File
      Roma_polyline.dbf 343 kB
    4. File
      Roma_polyline.prj 0.2 kB
    5. File
      Roma_polyline.shp 258 kB
    Download Zip
    Show
    Zip Archive
    Roma_polyline.zip
    24/Jan/05 6:00 AM
    161 kB
    Carlo Camusso
  1. rome.png
    19 kB
    21/Mar/10 6:26 AM
  2. screenshot-1.jpg
    19 kB
    24/Jan/05 6:09 AM
  3. screenshot-1.jpg
    19 kB
    24/Jan/05 6:08 AM

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
Hide
Permalink
Carlo Camusso added a comment - 24/Jan/05 5:58 AM
Main programm
Show
Carlo Camusso added a comment - 24/Jan/05 5:58 AM Main programm
Hide
Permalink
Carlo Camusso added a comment - 24/Jan/05 6:00 AM
Shape file
Show
Carlo Camusso added a comment - 24/Jan/05 6:00 AM Shape file
Hide
Permalink
Andrea Aime added a comment - 21/Mar/10 6:25 AM
Simple API misuses, the third argument was supposed to be a attribute name.

This one works against 2.6.2:

File file = new File("/home/aaime/devel/gisData/roma/Roma_polyline.shp");
        
        Map<String,Object> params = new HashMap<String,Object>();
        params.put( ShapefileDataStoreFactory.URLP.key, file.toURI().toURL() );
        params.put( ShapefileDataStoreFactory.CREATE_SPATIAL_INDEX.key, false );
        params.put( ShapefileDataStoreFactory.MEMORY_MAPPED.key, false );
        params.put( ShapefileDataStoreFactory.DBFCHARSET.key, "ISO-8859-1" );
        
        DataStore store = DataStoreFinder.getDataStore( params );
        FeatureSource featureSource = store.getFeatureSource( store.getTypeNames()[0] );
        
        StyleBuilder builder = new StyleBuilder();
        
        Style roadStyle = builder.createStyle();
        Stroke stroke = builder.createStroke(new Color(140,181,231), 6, builder.LINE_JOIN_ROUND, builder.LINE_CAP_ROUND);
        LineSymbolizer ls1 = builder.createLineSymbolizer(stroke);
        roadStyle.addFeatureTypeStyle(builder.createFeatureTypeStyle(null, builder.createRule(ls1)));
        
        
        // Create a map context and add our shapefile to it
        MapContext map = new DefaultMapContext();
        map.addLayer(featureSource, roadStyle);

        // Now display the map
        JMapFrame.showMap(map);
Show
Andrea Aime added a comment - 21/Mar/10 6:25 AM Simple API misuses, the third argument was supposed to be a attribute name. This one works against 2.6.2: File file = new File("/home/aaime/devel/gisData/roma/Roma_polyline.shp");                  Map<String,Object> params = new HashMap<String,Object>();         params.put( ShapefileDataStoreFactory.URLP.key, file.toURI().toURL() );         params.put( ShapefileDataStoreFactory.CREATE_SPATIAL_INDEX.key, false );         params.put( ShapefileDataStoreFactory.MEMORY_MAPPED.key, false );         params.put( ShapefileDataStoreFactory.DBFCHARSET.key, "ISO-8859-1" );                  DataStore store = DataStoreFinder.getDataStore( params );         FeatureSource featureSource = store.getFeatureSource( store.getTypeNames()[0] );                  StyleBuilder builder = new StyleBuilder();                  Style roadStyle = builder.createStyle();         Stroke stroke = builder.createStroke(new Color(140,181,231), 6, builder.LINE_JOIN_ROUND, builder.LINE_CAP_ROUND);         LineSymbolizer ls1 = builder.createLineSymbolizer(stroke);         roadStyle.addFeatureTypeStyle(builder.createFeatureTypeStyle(null, builder.createRule(ls1)));                           // Create a map context and add our shapefile to it         MapContext map = new DefaultMapContext();         map.addLayer(featureSource, roadStyle);         // Now display the map         JMapFrame.showMap(map);

People

  • Assignee:
    Andrea Aime
    Reporter:
    Carlo Camusso
Vote (0)
Watch (1)

Dates

  • Created:
    24/Jan/05 5:49 AM
    Updated:
    02/Jun/11 8:38 AM
    Resolved:
    21/Mar/10 6:26 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.