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 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