Hey Milton,

Your mail is indeed *exactly* what belongs in a bug report (JIRA task).
You never need to ask permission to open bug reports.

good work,
--adrian

On Thu, 2008-10-30 at 19:46 -0200, Milton Jonathan wrote:
> Hello there
> 
> I exchanged some e-mails a while ago with Jody, about issues with 
> spatial references when creating a schema on PostgisDataStore. Please see:
> http://n2.nabble.com/SRID-problems-when-writing-to-PostGIS-td1093252.html
> 
> I guess the conversation kind of died out, but we here did implement 
> what I see as the solution to the problem. Basically, I exchanged lines 
> 1287-1298 with the following code:
> 
> if (ident == null || ident.isEmpty()){
>      if (refSys == DefaultGeographicCRS.WGS84)
>          SRID = 4326;
>      else
>          SRID = CRS.lookupEpsgCode(refSys, true);
> }
> else{
>      String code = ((NamedIdentifier) ident.toArray()[0]).getCode();
>      SRID = Integer.parseInt(code);
> }
> 
> If it's OK with you, I can open up a JIRA task and send the patch over 
> there. I'm just not sure about the best way to implement a test for 
> that, though, since method createSchema() is quite large and uses tests 
> shared with DataTestCase, something like that. One thing we could do 
> would be to separate the task of figuring out the SRID as an independent 
> private or protected method (say, "getSRID"), and then use Java 
> reflection to access that method for testing purposes. Just an idea.
> 
> Cheers
> Milton
> 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to