Thanks this solves the problem

 

Feras

 

From: Sidonie Christophe [mailto:[email protected]] 
Sent: Wednesday, August 18, 2010 1:31 PM
To: Feras Odeh
Subject: Re : [Geotools-gt2-users] Re : Optimize shapefile loading

 

you should have jai-core too in your path (jai-codec, jai-core, jai-imageio).

someone else got this problem too : 
http://osgeo-org.1803224.n2.nabble.com/Question-about-changing-a-features-style-dynamically-td4087764.html

 

 

best regards,
Sidonie
(I met some trouble to write on the mailing list, but you should answer also on 
it, in order to get more answers)

 

  _____  

De : Feras Odeh <[email protected]>
À : Sidonie Christophe <[email protected]>
Envoyé le : Mer 18 août 2010, 12h 12min 39s
Objet : RE: [Geotools-gt2-users] Re : Optimize shapefile loading

No errors but I got this warning 

org.geotools.factory.FactoryRegistry scanForPlugins

WARNING: Can't load a service for category "MathTransformProvider". Cause is 
"NoClassDefFoundError: javax/media/jai/WarpAffine".

 

I have Jai-codec and jai-imageio in my classpath.

 

Feras

 

From: Sidonie Christophe [mailto:[email protected]] 
Sent: Wednesday, August 18, 2010 1:06 PM
To: geotools
Subject: [Geotools-gt2-users] Re : Optimize shapefile loading

 

Do you have a specific Java error ?

 
Sidonie

  _____  

De : Feras Odeh <[email protected]>
À : Sidonie Christophe <[email protected]>
Envoyé le : Mer 18 août 2010, 11h 57min 08s
Objet : RE: [Geotools-gt2-users] Optimize shapefile loading

Thanks..

 

I have tried this but the problem is that when I zoom in or out I got a white 
map !! 

 

Feras

 

From: Sidonie Christophe [mailto:[email protected]] 
Sent: Wednesday, August 18, 2010 12:19 PM
To: Feras Odeh
Subject: Re : [Geotools-gt2-users] Optimize shapefile loading

 

Hello,

Did you try to use a cache as following ? It may  improve the display...
 
"
 ...
  CachingFeatureSource cache = new CachingFeatureSource(featureSource);
  mymap.addLayer(cache, style);

 ....
"

Sidonie

 

 

 

  _____  

De : Feras Odeh <[email protected]>
À : [email protected]
Envoyé le : Mer 18 août 2010, 10h 37min 49s
Objet : [Geotools-gt2-users] Optimize shapefile loading

Hello ..

 

I’m new to geo tools  I’m trying to add shape file to mapcontext object so I 
use the following code I found on the quick start guide  

 

 

  File file = JFileDataStoreChooser.showOpenFile("shp", null);

 

        if (file == null) {

 

            return;

        }

        FileDataStore store;

        FeatureSource featureSource = null;

        try {

           store = FileDataStoreFinder.getDataStore(file);

           featureSource = store.getFeatureSource();

          MapContext map = new DefaultMapContext();

          map.setTitle("Rammallah Parcels");

           map.addLayer(featureSource, null);

 

My question is this the best way to add a big shape file to map as I have 
really big shapefiles more  than 50 mb  or there any other optimization I could 
do?  Is there any example could I follow to solve this problem?

 

Thanks

Feras

 

 

 

 

 

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to