using IAU2000 database

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

using IAU2000 database

Marek Caltik
Hi all,

I'm new to KOSMO. At first I want to appreciate your work, and I'm
glad to cooperate on a project as KOSMO is...

As a first task I try to enable projections from IAU2000 database.
According to our needs (we are in Slovakia) the best projection is
ESRI:102067, which we added to IAU2000 db.
KOSMO seems to be hard-coded to use EPSG database. I've found
hard-coded strings on many places inside source code:

proj = new CrsFactory().getCRS("EPSG:" + srid);)

I want to make our KOSMO more robust - give the user possibility to
choose EPSG, IAU2000 or other standards. As a first try I 'hardcoded'
some lines in com.vividsolutions.jump.workbench.model.Task (affects
default projection),
com.vividsolutions.jump.workbench.datasource.LoadDatasetPlugin (to add
new layer) and so on.
However this changes work for us, it's ugly and shortime solution. Do
you have some design recommendations how to incorporate these things
more clean?

thanks
regards
marek
_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int
Reply | Threaded
Open this post in threaded view
|

Re: using IAU2000 database

Sergio Baños Calvo
Good afternoon, Marek (and wellcome to the list ^_^).

For the next 2.0 version we have to revise the access to the CRS
factory, we already have an issue similar to the one that you have
commented and it's already implemented a partial solution, but not a
complete one. As soon as I've any news about it I'll post them back at
the list.

Also, there is a ESRI SRS database included in Kosmo, although currently
it's disabled because of some problems related to it that haven't been
resolved yet. I think the projection that you have pointed is included,
I need to check it...

Regards,

Marek Caltik escribió:

> Hi all,
>
> I'm new to KOSMO. At first I want to appreciate your work, and I'm
> glad to cooperate on a project as KOSMO is...
>
> As a first task I try to enable projections from IAU2000 database.
> According to our needs (we are in Slovakia) the best projection is
> ESRI:102067, which we added to IAU2000 db.
> KOSMO seems to be hard-coded to use EPSG database. I've found
> hard-coded strings on many places inside source code:
>
> proj = new CrsFactory().getCRS("EPSG:" + srid);)
>
> I want to make our KOSMO more robust - give the user possibility to
> choose EPSG, IAU2000 or other standards. As a first try I 'hardcoded'
> some lines in com.vividsolutions.jump.workbench.model.Task (affects
> default projection),
> com.vividsolutions.jump.workbench.datasource.LoadDatasetPlugin (to add
> new layer) and so on.
> However this changes work for us, it's ugly and shortime solution. Do
> you have some design recommendations how to incorporate these things
> more clean?
>
> thanks
> regards
> marek
> _______________________________________________
> Kosmo_int mailing list
> [hidden email]
> http://lists.saig.es/mailman/listinfo/kosmo_int
>
>  

--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int
Reply | Threaded
Open this post in threaded view
|

Re: using IAU2000 database

Marek Caltik
Hola Sergio,

We have made a simple patch to enable using other srs standards as EPSG:

This workaround enables searching srs repositories for given crsCode
until srs is obtained - in CrsFactory. The purpose is using crs
standards other than EPSG,
which is preferred/hardcoded in KOSMO. Repository name as part of the parameter
'code' (CrsFactory.getCrs) in front of a colon (e.g. EPSG:NNNN) is now
useless, but can be used for backward compatibility.
IMPORTANT: We assume that numeric code of one srs is unique accross
repositories (in fact only EPSG and IAU2000).
Search priority is EPSG repo. ESRI repo is irrelevant as it contains
duplicated EPSG/IAU codes.

Files changed/attached in zip:
LoadDatasetPlugIn.java: slightly updated method
'loadDataSourceQueryToLayer' see comments in sorce code
CrsFactory.java: rewritten method 'getCRS', see comments in there
EpsgRepository.java: updated method 'getCrs', if crs code doesn't
exist in this repository, no exception is thrown, null is returned.
Iau2000Repository.java: same as above

hope it helps
regards
Marek Caltik, Gista s.r.o

2009/5/20 Sergio Baños Calvo <[hidden email]>:

> Good afternoon, Marek (and wellcome to the list ^_^).
>
> For the next 2.0 version we have to revise the access to the CRS factory, we
> already have an issue similar to the one that you have commented and it's
> already implemented a partial solution, but not a complete one. As soon as
> I've any news about it I'll post them back at the list.
>
> Also, there is a ESRI SRS database included in Kosmo, although currently
> it's disabled because of some problems related to it that haven't been
> resolved yet. I think the projection that you have pointed is included, I
> need to check it...
>
> Regards,
>

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int

patchIAU2000-Gista.zip (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: using IAU2000 database

Sergio Baños Calvo
Good morning Marek.

The patches are wellcomed, we'll revise them because there are in fact
some changes added to the 2.0 branch and we have to merge the best of
both solutions.

Thanks in advance for helping in improving Kosmo ;-) .

Regards,

Marek Caltik escribió:

> Hola Sergio,
>
> We have made a simple patch to enable using other srs standards as EPSG:
>
> This workaround enables searching srs repositories for given crsCode
> until srs is obtained - in CrsFactory. The purpose is using crs
> standards other than EPSG,
> which is preferred/hardcoded in KOSMO. Repository name as part of the parameter
> 'code' (CrsFactory.getCrs) in front of a colon (e.g. EPSG:NNNN) is now
> useless, but can be used for backward compatibility.
> IMPORTANT: We assume that numeric code of one srs is unique accross
> repositories (in fact only EPSG and IAU2000).
> Search priority is EPSG repo. ESRI repo is irrelevant as it contains
> duplicated EPSG/IAU codes.
>
> Files changed/attached in zip:
> LoadDatasetPlugIn.java: slightly updated method
> 'loadDataSourceQueryToLayer' see comments in sorce code
> CrsFactory.java: rewritten method 'getCRS', see comments in there
> EpsgRepository.java: updated method 'getCrs', if crs code doesn't
> exist in this repository, no exception is thrown, null is returned.
> Iau2000Repository.java: same as above
>
> hope it helps
> regards
> Marek Caltik, Gista s.r.o
>
> 2009/5/20 Sergio Baños Calvo <[hidden email]>:
>  
>> Good afternoon, Marek (and wellcome to the list ^_^).
>>
>> For the next 2.0 version we have to revise the access to the CRS factory, we
>> already have an issue similar to the one that you have commented and it's
>> already implemented a partial solution, but not a complete one. As soon as
>> I've any news about it I'll post them back at the list.
>>
>> Also, there is a ESRI SRS database included in Kosmo, although currently
>> it's disabled because of some problems related to it that haven't been
>> resolved yet. I think the projection that you have pointed is included, I
>> need to check it...
>>
>> Regards,
>>
>>    
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kosmo_int mailing list
>> [hidden email]
>> http://lists.saig.es/mailman/listinfo/kosmo_int
>>    

--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int