When we download cartography from a web page we need to know its reference system in order to load it correctly in gvSIG. For that we have to look for it at the same web page, or access to the metadata if they are published.
The reference systems are designed by codes in gvSIG, and EPSG is the most used code (managed by the International Association of Oil & Gas Producers – IAOGP). If we don’t know the EPSG code of our reference system, we can search it in gvSIG by Name or by Area. We also can look for it at the next EPSG codes list.
When we are working on gvSIG we must select the reference system of the View that we are creating. Then, when we add a layer, if it’s at the same reference system than the View we will add it directly, and it will appear on the correct location.
Nevertheless, if it’s in a different reference system, we will act differently for raster or vector layers.
Reprojecting vector layers
If our vector layer is in a different reference system than the View one, we must indicate it when loading (we also can select the transformation to be applied in order to adjust the reprojection). As gvSIG detects that it’s a different reference system it will be reprojected on the fly.
This reprojection will be, as we said, “on the fly”, that means, the layer will be at its original reference system yet.
If we want to have that vector layer at the same reference system than the View, once it’s reprojected on the fly, we must export it to a new file (Layer->Export to menu)
That new file that we have saved on our computer will be on the new reference system, the same system than the View, so if we load it on the same View we won’t have to indicate its reference system, assuming the same than the View. It will be loaded correctly already.
Note: If we make any geoprocess on the ‘reprojected on the fly’ layer, we won’t get the correct results because it’s made on the layer on its original system. For that we must do it on the exported layer.
Reprojecting raster layers
If we have a raster layer that is in a different reference system than the View, gvSIG can’t reproject it at the same way than the vector layers.
If we want to reproject a raster layer to the same reference system than the View we will load it on the View directly (it won’t be loaded correctly), and we will use the “Reproject raster layer” tool.
For that we will open the raster tools main menu (we must click on the white triangle that is in the button), and then select the “Geographic transformations” option.
Once this option is selected, we open the menu at the right side, and we select “Reproject layer”.
At the new window, we select the source projection of the layer, and the target projection, that will be the same than the View one (selecting the transformation if we know it and we want to adjust the reprojection). We will select the name of the reprojected system and where it will be saved.
When we accept it, we indicate that it has to add the layer to the View, so it will be at the same reference system than the View. We will remove the old layer, and zoom to the new one.
How to check which is the reference system of a layer
If we have a layer, and we don’t know its reference system like we told at the beginning, and we don’t have the prj file with that information, we can use reference cartography to check it.
Most of the WMS services offer the layers in several reference systems, in the official ones of the offered area normally, so that we can use them for checking it.
For that we will open a View in gvSIG, that will be in a concrete reference system (one of the systems that we think our layer can be). Then we will load a WMS layer at the same system (it’s recommendable to use some layer that offers lots of details, like cadastral cartography). We will load our layer finally, assuming that it’s in the same reference system than the View, and if it coincides, the layer will be in that reference system.
In case it doesn’t coincide, we’ll do the same operation with another View in other reference system, and loading the WMS layer in that system.