Hello,
I need to load a shape file in my project, however i am receiving these
errors :
"Error while parsing JAI registry file
"file:/C:/Java/workspace/Geotools%20Download/geotools-10.3/imageio-ext-imagereadmt-1.1M012010.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #29
A descriptor is already registered against the name "ImageReadMT" under
registry mode "rendered"
Error while parsing JAI registry file
"file:/C:/Users/Elena/.m2/repository/org/geotools/gt-coverage/11-SNAPSHOT/gt-coverage-11-SNAPSHOT.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #31
A descriptor is already registered against the name
"org.geotools.ColorReduction" under registry mode "rendered"
Error in registry file at line number #32
A descriptor is already registered against the name
"org.geotools.ColorInversion" under registry mode "rendered"
Error in registry file at line number #33
A descriptor is already registered against the name "GTCrop" under registry
mode "rendered"
Error while parsing JAI registry file
"file:/C:/Users/Elena/.m2/repository/org/jaitools/jt-zonalstats/1.3.1/jt-zonalstats-1.3.1.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #4
A descriptor is already registered against the name "ZonalStats" under
registry mode "rendered"
The code is simple, i just took it from geotools side:
public static void main(String[] args) throws IOException,
NoSuchAuthorityCodeException, FactoryException, TransformException,
SchemaException {
System.setProperty("org.geotools.referencing.forceXY", "true");
File roads = new File("c:/java/Paris-shp/shape/roads.shp");
FileDataStore roadstore = FileDataStoreFinder.getDataStore(roads);
SimpleFeatureSource featureSource = roadstore.getFeatureSource();
MapContent map = new MapContent();
map.setTitle("Paris");
Style style = SLD.createSimpleStyle(featureSource.getSchema());
FeatureLayer layer = new FeatureLayer(featureSource, style);
map.addLayer(layer);
JMapFrame.showMap(map);
}
However, because of those errors i am not able to call this class in
another class and it .
Could you please give me a hand for this one.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users