Using the reprojection console

In the previous recipe, you learned that many CRS exist and data can be converted from one form to another.

In some cases, CRS, even if they are different, are really very similar. So, for general mapping purposes, you can consider them identical.

In this recipe, you'll discover a simple, yet very useful, tool that ships with GeoServer: the reprojection console. It lets you have a look at how coordinates change when you move data from an SRS to another one.

How to do it…

  1. From the GeoServer Web admin interface, select the Demos link on the left panel.
  2. From the list, select Reprojection console. A new interface is displayed.
    How to do it…
  3. Insert EPSG:4326 in Source CRS and EPSG:4269 in Target CRS. Then, insert POINT(-98.5795 39.828175) in Geometry of Source CRS. Click on the Forward Transformation link; GeoServer calculates the new coordinates for you and fills the Geometry of Target CRS textbox.
    How to do it…

    Note

    You may be wondering how I chose the coordinates; well, they were not randomly selected. This point is known as the geometrical center of contiguous USA; for more information, have a look at http://en.wikipedia.org/wiki/Geographic_center_of_the_contiguous_United_States.

  4. You may be surprised with values substantially equivalent after transformation, but there is a valid reason. I will explain what's happening in the How it works… section.
  5. Now replace the value inside Target CRS with EPSG:4230 and insert POINT(12.492269 41.890169) in the Geometry of Source CRS textbox. Again click on the Forward Transformation link and look at the result of the transformation:
    How to do it…

How it works…

Controls inside the Reprojection console are quite self-explanatory. Basically, you have to set two CRS and geometry, and then you can transform the geometry from a CRS to another. As you may have guessed, the function is reversible and almost all transformations do not have a direction, so you can operate them both ways, for example, converting from WGS84 to ED50 or vice versa.

Tip

When you converted the value from WGS84 to NAD83, the values were not changed, so was it GeoServer's fault?

In fact, the latitude value was very slightly different from the source, but this was not really due to conversion. It was just a matter of the internal representation of numbers.

To answer this question, you should understand how GeoServer transforms coordinates from a CRS to another. In the Reprojection Console, click on the link just to the right of the Target CRS textbox.

How it works…

As the pop up suggests, a new window opens with the full description of the CRS.

Focus on the TOWGS84 row. It contains the parameters to be used in transformation among WGS84 and NAD83. There are different types of transformations and according to the type, this could require from a minimum of three to seven parameters. Anyway, in this case, all parameters are equal to zero. So, GeoServer considers NAD83 and WGS84 identical and no transformation is applied.

How it works…

From a geodetic point of view, this isn't always correct; you may need more information about the data. Indeed, the first definition of WGS84 and NAD83 was fairly identical and differences among the two ellipsoids were under the meter accuracy, which is far less than the error introduced by transformations. If you are not going to deal with very accurate geodetic data, you can go with this simplification without any issue.

Now, check the same parameters for the WGS84 to ED50 transformation.

How it works…

As you see, in this case, all seven parameters are populated and as you may expect, the transformation result is quite different.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.12.34