[Geoserver-devel] Little reprojection console

Hi,
not sure if people have been following what’s going on in reprojection land,
but we have two new high precision coordinate transformation methods coming
down the pipe* on trunk and probably later on 2.1.x

The two methods are NTv2** and NADCON***, which allow for datum transformations
with cm level precision (instead of the usual 4m, when all goes well).
Both will activate only if the grid files are present in the data dir, so by
default the mere presence of the method is harmless, but generally
speaking this is very good news for whoever needs to increase reprojection
accuracy.

Now, of course people will want to make sure the transformations are actually
using the grids, but to do that one needs to see what actual transformation steps
are being used.
So I rolled out a small transformation console that allows to pick two coordinate
systems and transform a single point back and forth:

Inline image 1

The “show transformation details” dumps the actual transformation path in WKT syntax (yeah, there’s one
for transformations as well) allowing to see what exact values are used for the transformation:

Inline image 2

If you have grids activated and available you may get something like the following instead, which uses a NADCON grid
to transform from EPSG:4138 to EPSG:4326:

CONCAT_MT[PARAM_MT[“Affine”,
PARAMETER[“num_row”, 3],
PARAMETER[“num_col”, 3],
PARAMETER[“elt_0_0”, 0.0],
PARAMETER[“elt_0_1”, 1.0],
PARAMETER[“elt_1_0”, 1.0],
PARAMETER[“elt_1_1”, 0.0]],
PARAM_MT[“NADCON”,
PARAMETER[“Latitude difference file”, “stgeorge.las”],
PARAMETER[“Longitude difference file”, “stgeorge.los”]],
PARAM_MT[“Affine”,
PARAMETER[“num_row”, 3],
PARAMETER[“num_col”, 3],
PARAMETER[“elt_0_0”, 0.0],
PARAMETER[“elt_0_1”, 1.0],
PARAMETER[“elt_1_0”, 1.0],
PARAMETER[“elt_1_1”, 0.0]]]

The page would be a demo one, and as long as it transforms a single point it is probably harmless.
If you want to transform more, like WTK geometries, GML or shapefiles, there is a WPS process to do that already.

Opinions? I was thinking to land this next week along with the ability to search NTv2 and NADCON grids
in $GEOSERVER_DATA_DIR/user_projections

Cheers
Andrea

*: most of the NTv2 work has been done by Oscar Fonts, I chimed to have the NADCON transformations
be wired up as well and to simplify the grid lookup plugin code.
The EPSG database already contains references to some 50+ official NADCON grids and a dozen
NTv2 grids, but afaik Oscar wants to add some way to override the database and use a custom
grid between any arbitrary couple of EPSG codes.

**: http://jgridshift.sourceforge.net/ntv2.html

***: http://www.ngs.noaa.gov/TOOLS/Nadcon/Nadcon.html

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


Very nice, Andrea. This seems like an excellent tool to make it easier to access all the coordinate system goodness inside GeoServer. (In spite of all the CRS libraries out there, I’m always surprised by how hard it is to actually just convert an ad hoc coordinate).

A suggestion about the UI - for ease of cutting and pasting from other systems, it might be better to have a single text box for each of the coordinates. The ordinate values can be easily parsed out by splitting on non-numeric chars (in particular, commas and blanks). The coordinates can be output using some convention as a separator - comma is the obvious one, but blanks would do as well (which gives compatibility with WKT).

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

On Sun, Mar 18, 2012 at 3:00 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Now, of course people will want to make sure the transformations are actually
using the grids, but to do that one needs to see what actual transformation steps
are being used.
So I rolled out a small transformation console that allows to pick two coordinate
systems and transform a single point back and forth:

Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On Mon, Mar 19, 2012 at 1:38 AM, Martin Davis <mdavis@anonymised.com> wrote:

Very nice, Andrea. This seems like an excellent tool to make it easier to access all the coordinate system goodness inside GeoServer. (In spite of all the CRS libraries out there, I’m always surprised by how hard it is to actually just convert an ad hoc coordinate).

A suggestion about the UI - for ease of cutting and pasting from other systems, it might be better to have a single text box for each of the coordinates. The ordinate values can be easily parsed out by splitting on non-numeric chars (in particular, commas and blanks). The coordinates can be output using some convention as a separator - comma is the obvious one, but blanks would do as well (which gives compatibility with WKT).

Yeah, I could go there

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


Very nice! A very useful tool indeed!

On Mon, Mar 19, 2012 at 1:14 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Mar 19, 2012 at 1:38 AM, Martin Davis <mdavis@anonymised.com> wrote:

Very nice, Andrea. This seems like an excellent tool to make it easier to access all the coordinate system goodness inside GeoServer. (In spite of all the CRS libraries out there, I’m always surprised by how hard it is to actually just convert an ad hoc coordinate).

A suggestion about the UI - for ease of cutting and pasting from other systems, it might be better to have a single text box for each of the coordinates. The ordinate values can be easily parsed out by splitting on non-numeric chars (in particular, commas and blanks). The coordinates can be output using some convention as a separator - comma is the obvious one, but blanks would do as well (which gives compatibility with WKT).

Yeah, I could go there

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Very nice Andrea.

Good work

2012/3/19 Justin Deoliveira <jdeolive@anonymised.com>

Very nice! A very useful tool indeed!

On Mon, Mar 19, 2012 at 1:14 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Mar 19, 2012 at 1:38 AM, Martin Davis <mdavis@anonymised.com> wrote:

Very nice, Andrea. This seems like an excellent tool to make it easier to access all the coordinate system goodness inside GeoServer. (In spite of all the CRS libraries out there, I’m always surprised by how hard it is to actually just convert an ad hoc coordinate).

A suggestion about the UI - for ease of cutting and pasting from other systems, it might be better to have a single text box for each of the coordinates. The ordinate values can be easily parsed out by splitting on non-numeric chars (in particular, commas and blanks). The coordinates can be output using some convention as a separator - comma is the obvious one, but blanks would do as well (which gives compatibility with WKT).

Yeah, I could go there

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3203126609
mail: francesco.izzi@anonymised.com
skype: neofx8080

web: http://www.geosdi.org

+1 here

2012/3/19 Francesco Izzi <francesco.izzi@anonymised.com…2344…>

Very nice Andrea.

Good work

2012/3/19 Justin Deoliveira <jdeolive@anonymised.com01…>

Very nice! A very useful tool indeed!

On Mon, Mar 19, 2012 at 1:14 AM, Andrea Aime <andrea.aime@anonymised.com1268…> wrote:

On Mon, Mar 19, 2012 at 1:38 AM, Martin Davis <mdavis@anonymised.com> wrote:

Very nice, Andrea. This seems like an excellent tool to make it easier to access all the coordinate system goodness inside GeoServer. (In spite of all the CRS libraries out there, I’m always surprised by how hard it is to actually just convert an ad hoc coordinate).

A suggestion about the UI - for ease of cutting and pasting from other systems, it might be better to have a single text box for each of the coordinates. The ordinate values can be easily parsed out by splitting on non-numeric chars (in particular, commas and blanks). The coordinates can be output using some convention as a separator - comma is the obvious one, but blanks would do as well (which gives compatibility with WKT).

Yeah, I could go there

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3203126609
mail: francesco.izzi@anonymised.com
skype: neofx8080

web: http://www.geosdi.org


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Giuseppe La Scaleia
CNR - IMAA
geoSDI
Sviluppo Software

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3804697436
mail: giuseppe.lascaleia@anonymised.com
skype: glascaleia

web: http://www.geosdi.org

Great work Andrea, super cool.

On Mon, Mar 19, 2012 at 10:38 AM, Giuseppe La Scaleia <giuseppe.lascaleia@anonymised.com> wrote:

+1 here

2012/3/19 Francesco Izzi <francesco.izzi@anonymised.com344…>

Very nice Andrea.

Good work

2012/3/19 Justin Deoliveira <jdeolive@anonymised.com>

Very nice! A very useful tool indeed!

On Mon, Mar 19, 2012 at 1:14 AM, Andrea Aime <andrea.aime@anonymised.com1268…> wrote:

On Mon, Mar 19, 2012 at 1:38 AM, Martin Davis <mdavis@anonymised.com> wrote:

Very nice, Andrea. This seems like an excellent tool to make it easier to access all the coordinate system goodness inside GeoServer. (In spite of all the CRS libraries out there, I’m always surprised by how hard it is to actually just convert an ad hoc coordinate).

A suggestion about the UI - for ease of cutting and pasting from other systems, it might be better to have a single text box for each of the coordinates. The ordinate values can be easily parsed out by splitting on non-numeric chars (in particular, commas and blanks). The coordinates can be output using some convention as a separator - comma is the obvious one, but blanks would do as well (which gives compatibility with WKT).

Yeah, I could go there

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3203126609
mail: francesco.izzi@anonymised.com
skype: neofx8080

web: http://www.geosdi.org


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Giuseppe La Scaleia
CNR - IMAA
geoSDI
Sviluppo Software

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271

mob: +39 3804697436
mail: giuseppe.lascaleia@anonymised.com
skype: glascaleia

web: http://www.geosdi.org


This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Mon, Mar 19, 2012 at 12:14 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Yes, I realized this as well. Could always limit the input size to something reasonable - say 1000 chars.

Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On Tue, Mar 20, 2012 at 5:09 PM, Martin Davis <mdavis@anonymised.com> wrote:

On Mon, Mar 19, 2012 at 12:14 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

And really, why stop at single coordinates? It would be pretty easy to allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Yes, I realized this as well. Could always limit the input size to something reasonable - say 1000 chars.

Hmm… all I need there is the WKT of the transform, the point transformation is already a plus to
give a minimum of functionality and allow people to make comparisons and such.

Once it’s committed feel free to expand it to support WKT submissions with size limit and whatnot

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


On Tue, Mar 20, 2012 at 5:34 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Mar 19, 2012 at 12:14 AM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

And really, why stop at single coordinates? It would be pretty easy to
allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no
control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the
WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Yes, I realized this as well. Could always limit the input size to
something reasonable - say 1000 chars.

Hmm… all I need there is the WKT of the transform, the point
transformation is already a plus to
give a minimum of functionality and allow people to make comparisons and
such.

Once it’s committed feel free to expand it to support WKT submissions with
size limit and whatnot

Eh, I had to rewrite fully the input components but here it is, with the ability to
transform both x y points and wkt geometries:

Inline image 1

(For the record, the above transformation does not make sense, the geometry is outside of the area of definition of EPSG:3003,
adding a warning for the CRS that do have an area of definition would have been nice too, but I definitely run out of steam before
getting to that).

It has been committed on trunk

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


Hi all,

how can I test the NTV2 trasformation ?

I have ItalyMonteMarioToWGS84_NTV2.gsb file and i put the grid in $GEOSERVER_DATA_DIR/user_projections.

Is there some log to be sure that the grid is in use ?

Thanks all,

2012/3/25 Andrea Aime <andrea.aime@anonymised.com>

On Tue, Mar 20, 2012 at 5:34 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Mar 19, 2012 at 12:14 AM, Andrea Aime
<andrea.aime@anonymised.com…> wrote:

And really, why stop at single coordinates? It would be pretty easy to
allow entering WKT too, right? 8^)

Because the tool is provided to non authenticated users, there’s no
control over it. A point is a point, a WKT can
be (theoretically) arbitrarily large, for that you already can use the
WPS reproject geometry process + process
builder (assuming the current user is authorized to access WPS, that is)

Yes, I realized this as well. Could always limit the input size to
something reasonable - say 1000 chars.

Hmm… all I need there is the WKT of the transform, the point
transformation is already a plus to
give a minimum of functionality and allow people to make comparisons and
such.

Once it’s committed feel free to expand it to support WKT submissions with
size limit and whatnot

Eh, I had to rewrite fully the input components but here it is, with the ability totransform both x y points and wkt geometries:

Inline image 1

(For the record, the above transformation does not make sense, the geometry is outside of the area of definition of EPSG:3003,
adding a warning for the CRS that do have an area of definition would have been nice too, but I definitely run out of steam before
getting to that).

It has been committed on trunk

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3203126609
mail: francesco.izzi@anonymised.com
skype: neofx8080

web: http://www.geosdi.org

On Mon, Mar 26, 2012 at 10:52 AM, Francesco Izzi <francesco.izzi@anonymised.com> wrote:

Hi all,

how can I test the NTV2 trasformation ?

I have ItalyMonteMarioToWGS84_NTV2.gsb file and i put the grid in $GEOSERVER_DATA_DIR/user_projections.

Is there some log to be sure that the grid is in use ?

For the moment there is no way to use a custom grid file, and IGM evidently gave no reference to an
official gsb file to EPSG.
The grid files supported are listed, for the moment, here, see my last comments:

https://jira.codehaus.org/browse/GEOS-5006

I hear Oscar wants to add a transformation provider that will allow to
specify custom grid files outside of what the EPSG dabase already knows about,
but not sure when that will be done

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


Hey! I was missing this thread!

Great to have a tool to see what transformation is being used in each case. Long needed for those who need to control what is going on under the hood.

2012/3/26 Francesco Izzi <francesco.izzi@anonymised.com>

how can I test the NTV2 trasformation ?
I have ItalyMonteMarioToWGS84_NTV2.gsb file and i put the grid in $GEOSERVER_DATA_DIR/user_projections.

As long as the transform is registered in the EPSG database, that is the way to go: simply copy the .gsb file in $GEOSERVER_DATA_DIR/user_
projections. The file has to be named exactly as in the EPSG registry.

Now, which are the registered transforms in EPSG? Ok, documentation needed. I’ll go for it asap. For now, follow Andrea’s work here: https://jira.codehaus.org/browse/GEOS-5006

And, what if the trasform is not listed in EPSG? Well, that will need a way to use user-defined transformations (similar to epsg_overrides, but beyond towgs84 params). Still working on that, trying to find my way across ReferencingFactories. Stay tuned.

Is there some log to be sure that the grid is in use ?

Use the console, check transformation deails. See the first message in this thread (haven’t tested myself – yet).

Oscar.

Hi all,

I noticed that if I enable the geotools dev log I get these errors:

26 mar 16:07:20 DEBUG [org.geotools.referencing.factory] - Failed to create an object for code “8647”.

org.opengis.referencing.NoSuchIdentifierException: Could not locate NTv2 Grid File NTv2_0.gsb

at org.geotools.referencing.operation.transform.NTv2Transform.(NTv2Transform.java:115)

at org.geotools.referencing.operation.transform.NTv2Transform$Provider.createMathTransform(NTv2Transform.java:406)

at org.geotools.referencing.operation.DefaultMathTransformFactory.createParameterizedTransform(DefaultMathTransformFactory.java:463)

at org.geotools.referencing.operation.DefaultMathTransformFactory.createBaseToDerived(DefaultMathTransformFactory.java:352)

at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateOperation(DirectEpsgFactory.java:2727)

at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateOperation(BufferedAuthorityFactory.java:1041)

at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateOperation(DirectEpsgFactory.java:2676)

at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateOperation(BufferedAuthorityFactory.java:1041)

at org.geotools.referencing.factory.epsg.CoordinateOperationSet.createObject(CoordinateOperationSet.java:91)

at org.geotools.referencing.factory.IdentifiedObjectSet$Iter.toNext(IdentifiedObjectSet.java:394)

at org.geotools.referencing.factory.IdentifiedObjectSet$Iter.(IdentifiedObjectSet.java:378)

at org.geotools.referencing.factory.IdentifiedObjectSet.iterator(IdentifiedObjectSet.java:221)

at org.geotools.referencing.factory.IdentifiedObjectSet.resolve(IdentifiedObjectSet.java:239)

at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createFromCoordinateReferenceSystemCodes(DirectEpsgFactory.java:2849)

at org.geotools.referencing.factory.BufferedAuthorityFactory.createFromCoordinateReferenceSystemCodes(BufferedAuthorityFactory.java:1065)

at org.geotools.referencing.operation.AuthorityBackedFactory.createFromDatabase(AuthorityBackedFactory.java:242)

at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.tryDB(DefaultCoordinateOperationFactory.java:1562)

at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1006)

at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:286)

at org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:256)

at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:647)

at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:603)

at org.geoserver.gwc.layer.GeoServerTileLayer.getLatLonBbox(GeoServerTileLayer.java:247)

at org.geoserver.gwc.layer.GeoServerTileLayer.checkGridSubsets(GeoServerTileLayer.java:692)

at org.geoserver.gwc.layer.GeoServerTileLayer.getGridSubsets(GeoServerTileLayer.java:680)

at org.geowebcache.diskquota.storage.TilePageCalculator.getTileSetsFor(TilePageCalculator.java:91)

at org.geowebcache.diskquota.storage.BDBQuotaStore.createLayer(BDBQuotaStore.java:257)

at org.geowebcache.diskquota.storage.BDBQuotaStore.access$700(BDBQuotaStore.java:40)

at org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:224)

at org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:186)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:680)

I work with full build of (GeoTools/Geoserver TRUNK)

2012/3/26 Oscar Fonts <oscar.fonts@anonymised.com>

Hey! I was missing this thread!

Great to have a tool to see what transformation is being used in each case. Long needed for those who need to control what is going on under the hood.

2012/3/26 Francesco Izzi <francesco.izzi@anonymised.com>

how can I test the NTV2 trasformation ?
I have ItalyMonteMarioToWGS84_NTV2.gsb file and i put the grid in $GEOSERVER_DATA_DIR/user_projections.

As long as the transform is registered in the EPSG database, that is the way to go: simply copy the .gsb file in $GEOSERVER_DATA_DIR/user_
projections. The file has to be named exactly as in the EPSG registry.

Now, which are the registered transforms in EPSG? Ok, documentation needed. I’ll go for it asap. For now, follow Andrea’s work here: https://jira.codehaus.org/browse/GEOS-5006

And, what if the trasform is not listed in EPSG? Well, that will need a way to use user-defined transformations (similar to epsg_overrides, but beyond towgs84 params). Still working on that, trying to find my way across ReferencingFactories. Stay tuned.

Is there some log to be sure that the grid is in use ?

Use the console, check transformation deails. See the first message in this thread (haven’t tested myself – yet).

Oscar.


Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3203126609
mail: francesco.izzi@anonymised.com
skype: neofx8080

web: http://www.geosdi.org

Here Geotools discovers a NTv2 transform in the EPSG database and tries to locate the grid file.
File is not there, so it throws a “NoSuchIdentifier” exception, logs it at fine level, and jumps to the next available transform.
Not harmful, just informative at DEBUG level.

See “Exception Handling” in IdentifiedObjectSet:
http://docs.geotools.org/stable/javadocs/org/geotools/referencing/factory/IdentifiedObjectSet.html

Oscar.

2012/3/26 Francesco Izzi <francesco.izzi@anonymised.com>

Hi all,

I noticed that if I enable the geotools dev log I get these errors:

26 mar 16:07:20 DEBUG [org.geotools.referencing.factory] - Failed to create an object for code “8647”.

org.opengis.referencing.NoSuchIdentifierException: Could not locate NTv2 Grid File NTv2_0.gsb

at org.geotools.referencing.operation.transform.NTv2Transform.(NTv2Transform.java:115)

at org.geotools.referencing.operation.transform.NTv2Transform$Provider.createMathTransform(NTv2Transform.java:406)

at org.geotools.referencing.operation.DefaultMathTransformFactory.createParameterizedTransform(DefaultMathTransformFactory.java:463)

at org.geotools.referencing.operation.DefaultMathTransformFactory.createBaseToDerived(DefaultMathTransformFactory.java:352)

at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateOperation(DirectEpsgFactory.java:2727)

at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateOperation(BufferedAuthorityFactory.java:1041)

at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateOperation(DirectEpsgFactory.java:2676)

at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateOperation(BufferedAuthorityFactory.java:1041)

at org.geotools.referencing.factory.epsg.CoordinateOperationSet.createObject(CoordinateOperationSet.java:91)

at org.geotools.referencing.factory.IdentifiedObjectSet$Iter.toNext(IdentifiedObjectSet.java:394)

at org.geotools.referencing.factory.IdentifiedObjectSet$Iter.(IdentifiedObjectSet.java:378)

at org.geotools.referencing.factory.IdentifiedObjectSet.iterator(IdentifiedObjectSet.java:221)

at org.geotools.referencing.factory.IdentifiedObjectSet.resolve(IdentifiedObjectSet.java:239)

at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createFromCoordinateReferenceSystemCodes(DirectEpsgFactory.java:2849)

at org.geotools.referencing.factory.BufferedAuthorityFactory.createFromCoordinateReferenceSystemCodes(BufferedAuthorityFactory.java:1065)

at org.geotools.referencing.operation.AuthorityBackedFactory.createFromDatabase(AuthorityBackedFactory.java:242)

at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.tryDB(DefaultCoordinateOperationFactory.java:1562)

at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1006)

at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:286)

at org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:256)

at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:647)

at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:603)

at org.geoserver.gwc.layer.GeoServerTileLayer.getLatLonBbox(GeoServerTileLayer.java:247)

at org.geoserver.gwc.layer.GeoServerTileLayer.checkGridSubsets(GeoServerTileLayer.java:692)

at org.geoserver.gwc.layer.GeoServerTileLayer.getGridSubsets(GeoServerTileLayer.java:680)

at org.geowebcache.diskquota.storage.TilePageCalculator.getTileSetsFor(TilePageCalculator.java:91)

at org.geowebcache.diskquota.storage.BDBQuotaStore.createLayer(BDBQuotaStore.java:257)

at org.geowebcache.diskquota.storage.BDBQuotaStore.access$700(BDBQuotaStore.java:40)

at org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:224)

at org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:186)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:680)

I work with full build of (GeoTools/Geoserver TRUNK)

2012/3/26 Oscar Fonts <oscar.fonts@anonymised.com.>

Hey! I was missing this thread!

Great to have a tool to see what transformation is being used in each case. Long needed for those who need to control what is going on under the hood.

2012/3/26 Francesco Izzi <francesco.izzi@anonymised.com>

how can I test the NTV2 trasformation ?
I have ItalyMonteMarioToWGS84_NTV2.gsb file and i put the grid in $GEOSERVER_DATA_DIR/user_projections.

As long as the transform is registered in the EPSG database, that is the way to go: simply copy the .gsb file in $GEOSERVER_DATA_DIR/user_
projections. The file has to be named exactly as in the EPSG registry.

Now, which are the registered transforms in EPSG? Ok, documentation needed. I’ll go for it asap. For now, follow Andrea’s work here: https://jira.codehaus.org/browse/GEOS-5006

And, what if the trasform is not listed in EPSG? Well, that will need a way to use user-defined transformations (similar to epsg_overrides, but beyond towgs84 params). Still working on that, trying to find my way across ReferencingFactories. Stay tuned.

Is there some log to be sure that the grid is in use ?

Use the console, check transformation deails. See the first message in this thread (haven’t tested myself – yet).

Oscar.


Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050 Tito Scalo - POTENZA (PZ)
Italia

phone: +39 0971427305
fax: +39 0971 427271
mob: +39 3203126609
mail: francesco.izzi@anonymised.com
skype: neofx8080

web: http://www.geosdi.org