Hi Peppe,
Sorry for this regression,
Maybe it is not a big deal to fix it. Can you send me the geotiff and
the png with auxilliary files ?
What is the code supposed to do ?
- read the referencing in geotiff
- check if an auxilliary file is present even if geotiff is already
georeferenced ?
- replace geotiff referencing by auxilliary file referencing if present ?
I could not find any documentation about .aux file. How do you know how
to parse it ? Reverse engineering ?
Michaël
Le 29/03/2017 à 17:24, Giuseppe Aruta a écrit :
Hi Ede, Michael
Been a bit more accurate.
thev following images will show the regression between OJ 4961 and
5389 (newer one).
I took these two samples related to GeoTIFF and a raster file with
auxiliary file - only to Layer.class info plugin
(org.openjump.core.ui.plugin.layer.NewLayerPropertiesPlugIn).
Since NewLayerPropertiesPlugIn and RasterImageLayerPropertiesPlugIn
share the same code, also the latter is affected to same regression.
I did a test using ver. 4961 (sept 2016) as It is the last one I know
the code related to proj detection well.
Later Michael worked around to simplify the code and make it more
simple to use.
Note that this regression might happen in any of version betwee 4961
and newer: AFAIR I did some tests on Michael code afte changes and it
seemed to me that everything was working well.
-----------------------------------------------------------------------------------------------------
I used red lines to show what is missing on newer version
A) GeoTIFF
Older version shows Measure Unit of CRS and that source path of CRS is
Geographic metadata
Newer version doesn't show Measure Unit of CRS a and repeats file path
as source path of CRS
B) Raster (png) with projection saved into an auxiliary file
Older version shows shows Measure Unit of CRS and that CRS is saved
into an auxiliary file and reports the file path
Newer version doesn't show Measure Unit and no info about CRS location
Differences "In a nut shell"
- Both proj codes _records_ layer SRID and_save it_ as SRIDStyle on
loading file (for Layer.class files)
- Newer proj code doesn't report Measure Unit on SRS definition
- Newer code in some cases fails to read where SRS is stored (I think
only for file.png.aux.xml and for file.png.prj projection files)
- Newer code (for GeoTIFF) reports the file path as source proj
location - not "Geographic metadata" string
What to do?
I don't think we should switch back to older code.
My proposal is to deactivate "Source path" projection info row on
both plugins:
org.openjump.core.ui.plugin.layer.NewLayerPropertiesPlugIn
and
org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn
before to define OJ 1.11 real.
Later we can find a solution.
By the way, since the projection detection works well and SRS is saved
as SRIDStyle, I don't care to check were SRS is stored (and Michael's
reprojection plugin resets SRIDStyle to the exact reprojected value)
Regarding Measure Unit, I would like to reactivate it somehow. I need
that value as I am working to a newer version of my Measure Toolbox
plugin which automatically was resetting its mesure units according to
selected Layer (or RasterImageLayer)
BTW: After OJ 1.11, I will add to RasterImageLayer the capability to
record SRID into metadata. I already have a working code. This will
allow proj detection on RasterImageLayer only once when the file is
loaded.
Best regard and sorry for this long mail :-(
Peppe
-
2017-03-28 13:28 GMT+02:00 <edgar.sol...@web.de
<mailto:edgar.sol...@web.de>>:
On 28.03.2017 13:05, Giuseppe Aruta wrote:
> Ede,
> CadTools: we made the right corrections on the toolset but we
didin't add a new Cadtools version to OJ NB.
> I give a look and make some test and add the new version today
right, just thought about that yesterday, but it slipped my mind.
getting old :))
>>what i mean is to move code reading .proj files or read geotiff
info into the loading code for layers
> please check
org.openjump.core.ui.io.file.DataSourceFileLayerLoader - line 231.
> Michael and I worked on this possibility since first test. The
problem comes when user should check if SRID is related to loading
file or if it has been changed once using Layer>Set SRID (Style)
plugin. I added on the first version a way to compare file srid
with style srid: if they were the same so no changes was done on
SRIDStyle.
interesting point. will check.
> But, as you mantioned on a previous mail, it might be wierd to
a) read proj layer to store into SRIDStyle on loading file b)
re-read proj layer to check if SRIDStyle was changed. I am
thinking a check on ChangeSRIDPlugIn to unable plugin except it is
transformed using Michael reprojection plugin.
> Another idea is to let ChangeSRIDPlugIn capability only into
Michael reprojection plugin (withan option to set SRID instead to
reproject)
the projection might be wrongly assigned for whatever reason, so
the general possibility to simply assign another one seems to be
favourable.
a warning though, if it differs from the underlying datasource
alerting the user to this fact should be sufficient to prevent
mistakes.
..ede
>
> Peppe
>
> 2017-03-28 12:16 GMT+02:00 <edgar.sol...@web.de
<mailto:edgar.sol...@web.de> <mailto:edgar.sol...@web.de
<mailto:edgar.sol...@web.de>>>:
>
> On 28.03.2017 07:17, Giuseppe Aruta wrote:
> >> i had a look and saw that
NewLayerPropertiesPlugIn$InfoPanel.setInfoProjection() tries to
determine the projection, which is wrong! instead it should rely
on the (if) set SRIDStyle and read that.
> >
> > I corrected that Ede. That was easy as we already have the
code. Now SRIDStyle should be read on loading file (at least with
Layer.class, vector or image readers).
>
> not really. what i mean is to move code reading .proj files
or read geotiff info into the loading code for layers. currently
your plugin does that, if only for informational purposes.
>
> > Let us wait for next real. to solve proj. source.
>
> ok, i will go ahead w/ the release as soon as i get the go
from Mike. ..ede
>
>
------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
<mailto:Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>>
>
>
>
>
>
------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel