Adrian Custer wrote:
> On Thu, 2007-09-20 at 08:31 -0700, Justin Deoliveira wrote:
>   
>> Ok, let me make sure I am getting this right. So the following code
>> should generate a warning:
>>
>> SimpleFeatureTypeBuilder b = new ...();
>> b.setName( "foo" );
>> b.add( "geometry", Point.class );
>> SimpleFeatureType type = b.buildFeatureType();
>>
>> But the following code should not:
>>
>> SimpleFeatureTypeBuilder b = new ...();
>> b.setName( "bar" );
>> b.setCRS( null );
>> b.add( "geometry", Point.class );
>> SimpleFeatureType type = b.buildFeatureType();
>>     
>
> Absolutely. The user is showing they are aware there is no CRS rather
> than unaware CRS's even exist.
>
>   
>>> Does that work for you? Perhaps this is already the case.
>>>
>>>       
>> The way the builder is written now it is ok for the crs to be set to
>> null, and there is no default.
>>     
>
> By default geometries would have CRS's of null. You are saying the
> Feature itself would not have a CRS? I thought we decided that we didn't
> understand what the feature having a CRS actually meant and so decided
> to drop it.
>
>
>   
>> Looking at that page I do have one issue with
>> one of the code examples. Its the the "Multiple CRS for Geometries". The
>> setCRS(..) method is not meant to be called twice. It is setting
>> "global" state so it should really be called once. When setting "per
>> attribute state" the crs(..) method should be used.
>>
>> For instance, until recently feature types themselves had a crs. This
>> has been removed now but the setCRS would map to that crs, the one of
>> the feature type itself. And actually in implementation one thing we
>> might actually want to do is set the crs as user data. By using setCRS
>> to set the global context for each attribute that is added you are
>> clobbering it each time.
>>
>> Is that making sense?
>>     
>
> No, sorry. I don't see the difference. What does the .crs(..) call do?
> It returns the builder in its new state right? How is that different
> than setting the global state?
>   
Adrian we have the same understanding of how chaining works. I don't 
think there is a global
CRS - only the current one we are using when we next create a geometry 
attribute.

The rest of this email is just confusion as Justin and yourself dance 
around this difference of opinion.
> passing the $ to jody...
>   
Oh I am richer! I need a few more bucks for coffee however.

Justin can we please:
- drop Feature.getCRS() - as a data model concern; you can document as a 
helper method for getDefaultGeometryProperty().getCRS() with appropriate 
null checks (we don't see the following cut and paste:

CoordinateReferenceSystem crs = feature.getDefaultGeometryProperty() == 
null ? null : feature.getDefaultGeometryProperty().getCRS();

- make the chaining methods boiler plate as in the last email.

Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to