Hi Michael,
thanks for the comments,

>- wonder if WKT parser and prj parser included in cts could help
I first checked to cts class  than I decided to define a new class.
I preferred this solution as the registry (srid.txt) can easely extended
with new epsg codes or, what I wanted to have, "dialects" of codes (for
instance 4326 has 2 lines (<4326>;<WGS 84> and <4326>;<GCS WGS 84>) and
some others even three.
Right now,
In the future, whe I found a way, an  user can upgrade constantly the
registry with new codes (I took the idea from MapWindows GIS).

> - there is probably a typo on method name getWktrojDefinition
> - in decodeProjDescription you use replace or replaceAll with regex
argument,
>but only replaceAll takes a regex argument, replace use a simple
CharSequence
>(does not understand \\b)>
I will correct on the next days

Michael, I discovered 2 very usefull classes from your  CTSPlugin:
org.openjump.util.SuggestTree.SuggestTreeComboBox and
org.openjump.util.SuggestTree.
I started to use them into an experimental plugin (a "massive" exporter for
layerables) I am working around and I plan to add to OJ. I ask you if you
can add these classes to OpenJUMP source code. Thanks
Peppe

2016-07-07 23:50 GMT+02:00 Michaël Michaud <m.michael.mich...@orange.fr>:

> Hi Peppe,
>
> Seems you did a good work on projection support.
>
> I did not test yet, but had a quick look at the code :
>
> - wonder if WKT parser and prj parser included in cts could help
>
> - there is probably a typo on method name getWktrojDefinition
>
> - in decodeProjDescription you use replace or replaceAll with regex
> argument,
> but only replaceAll takes a regex argument, replace use a simple
> CharSequence
> (does not understand \\b)
>
> Le 06/07/2016 à 19:37, Giuseppe Aruta a écrit :
>
> Hi Stefan, Ede, Michael, Jukka and others
>
> I added to org.openjump.core.ui.io.file.DataSourceFileLayerLoader a small
> piece of code that should be able to detect SRID code from a file when it
> is loaded as Layer.class (Open>File..). It should be available on OJ 4951
>
> It uses a method I added to class
> org.openjump.core.ccordsys.utils.ProjUtils, which is able to detect SRID
> from GeoTIFF tag or, more tricky, to convert known WKT projection string
> from a .PRJ or .AUX file to a SRID code (currently only EPSG and ESRI codes
> are supported).
>
> This method  doesn't use any extra libraries (no Geotools) but only OJ
> resources ( see files into package org.openjump.core.ccordsys.utils).
> Whith this modification the ability of OJ to read projection could be
> coplete, at least for Layer.class, as datastores and WFS already save layer
> SRIDStyle.
>
> This may sound of very low usage, for now. But I feel that the
> possibilitues for the future should be more actractive.
> For instance, on OJ 4951  Michael's reprojection plugin will correctly
> detect source SRS.
>
> In the future we can add a "Set project SRS", like in GvSIG or Kosmo. So,
> whenever a file is loaded, the system could compare Projection SRS with
> Layer SRS and warns that the file should be reprojected - not "on fly" but
> close.
>
> I hope I didn't break any "tea set"  with this modification so I ask you
> to test in the next days if everythig goes right.
>
> Best regards
> Peppe
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register 
> today.http://sdm.link/attshape
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing 
> listJump-pilot-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to