[Geoserver-devel] Rendering Transformations and CRS transformation?

What are the responsibilities of Rendering Transformations when a CRS transformation is being applied in the rendering pipeline?

As far as I have seen so far, the RT process is supplied with the data in the source CRS, and the result is expected to be in the target CRS. This implies that RTs are responsible for doing a CRS transformation if required. Is this correct?

In the case of the vector-to-raster RTs this behaviour is actually desirable, since the process needs to compute the output raster in the target CRS, to ensure that it is properly displayed in the returned image. For vector-to-vector RTs this may be less necessary, and it may be preferable to do all computation in the source CRS.

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

On Wed, Mar 21, 2012 at 10:32 PM, Martin Davis <mdavis@anonymised.com> wrote:

What are the responsibilities of Rendering Transformations when a CRS transformation is being applied in the rendering pipeline?

As far as I have seen so far, the RT process is supplied with the data in the source CRS, and the result is expected to be in the target CRS. This implies that RTs are responsible for doing a CRS transformation if required. Is this correct?

Hmm… not example.
The rendering transformation can do both, either leave the output in the data native CRS or go directly to
the output CRS (or even to a third one). If the data is not transformed the renderer should do that later.
A rendering transformation to the renderer should just be a wrapper around the data access mechanism.
Typically vector to vector or raster to vector transformations do not reproject, raster ones can but it’s
not a requirement.

Data access wise, normal vector and rasters do return data in their native systems, but for example WMS
cascading does also the reprojection if at all possible (e.g., if the remote server can output in the desired
SRS)

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


Great, makes sense.

I realized after posting that the renderer probably checks the CRS of the RT output, and transforms if it needs to. That’s basically what you’re saying below, right? Do you have a line reference for this in the code?

All good info for the (eventual) Rendering Transformation section in the Developer’s Guide… 8^)

On Wed, Mar 21, 2012 at 3:03 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Wed, Mar 21, 2012 at 10:32 PM, Martin Davis <mdavis@anonymised.com> wrote:

What are the responsibilities of Rendering Transformations when a CRS transformation is being applied in the rendering pipeline?

As far as I have seen so far, the RT process is supplied with the data in the source CRS, and the result is expected to be in the target CRS. This implies that RTs are responsible for doing a CRS transformation if required. Is this correct?

Hmm… not example.
The rendering transformation can do both, either leave the output in the data native CRS or go directly to
the output CRS (or even to a third one). If the data is not transformed the renderer should do that later.
A rendering transformation to the renderer should just be a wrapper around the data access mechanism.
Typically vector to vector or raster to vector transformations do not reproject, raster ones can but it’s
not a requirement.

Data access wise, normal vector and rasters do return data in their native systems, but for example WMS
cascading does also the reprojection if at all possible (e.g., if the remote server can output in the desired
SRS)

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


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

On Wed, Mar 21, 2012 at 11:54 PM, Martin Davis <mdavis@anonymised.com> wrote:

Great, makes sense.

I realized after posting that the renderer probably checks the CRS of the RT output, and transforms if it needs to. That’s basically what you’re saying below, right? Do you have a line reference for this in the code?

Yep, it’s what I’m saying. That’s how it should work at least.
Code wise search in the streaming renderer the place that instantiates the MathTransform objects

Cheres
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