Make sure you have an "epsg" jar in the mix; you can also go through all the 
codes and see if 31466 is even defined. When you use an older version of 
geotools you are often using a very old EPSG database.

Jody

On 27/04/2010, at 1:25 AM, Daniel Moraru wrote:

> Hi List,
>  
> I am bounded by an application on geotools version 2.4.2 and have to make a 
> Feature Collection.
>  
> My Problem is that the application doesn’t recognize the CRS. I tried two 
> possible ways (see code line 5 and 6) to set the CRS to the feature type and 
> so to the feature collection, but nothing works.
>  
> I have points with each a single value and all the same coordinate reference 
> system CRS. How can I put all this data in a FeatureCollection?
>  
> My code:
> 1   FeatureCollection collection = FeatureCollections.newCollection();
> 
> 2   FeatureTypeBuilder featurebuilder = 
> FeatureTypeBuilder.newInstance("TEST");
> 
> 3   CoordinateReferenceSystem coordrs = CRS.decode("EPSG:31466");
> 
> 4   FeatureType type = null;
> 
> 5   type = DataUtilities.createType("stype = 
> DataUtilities.createSubType(type, null, coordrs);os", 
> "geom:Point,crs:String,value:Double");
> 
> 6   type = DataUtilities.createSubType(type, null, coordrs);
> 
> 7   collection.add(type.create(new Object[] {geomFactory.createPoint(new 
> Coordinate(xcoord,ycoord)),time, obs}));
> 
>  
> How would you do it?
> 
>  
> Regards
> 
> Daniel
> 
> 
> Ihre Daten brauchen Platz? SkyDrive gibt Ihnen 25 GB - gratis! 
> ------------------------------------------------------------------------------
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to