The Military Grid Reference System (MGRS) is a worldwide standard based on Universal Transverse Mercator (UTM) used by NATO to locate points on the earth. More information about MGRS can be found in the Wikipedia.
You can use this mapplet to display the MGRS coordinates for any point on Google Maps. Simply click on any location on Google Maps. Just adjust the Readout Digits to matched the desired MGRS Coordinate accuracy.
Alternatively, you can type in an MGRS coordinate in the side bar e.g. 32SMG0329. Then click the Locate point on map button to display the MGRS coordinate on Google Maps.
The default datum used is WGS84. If a different datum is desired, then simple click Datum and select another datum e.g. WGS72.
Go to this site http://dominoc925-pages.appspot.com/mapplets/cs_mgrs.html to run the mapplet.
Monday, April 30, 2012
Tuesday, April 24, 2012
Example of using gvSIG'S Modeler
gvSIG's Modeler function can be used to create reusable models of processes that can be applied on geographical vector and raster data layers. For example, if you need to periodically generate centroids and calculate the centroid coordinates from polygon vector layers, then it may be worthwhile to use the Modeler. Once you have a model of the processes created, it is a simple matter to reload the model and run it.
The models are almost similar to programming scripts except that you don't need to be a developer to create them. You simply use a graphical user interface to point and click to define the model. The example below shows how easy it is to create the model with the Modeler.
Create a New Model
The models are almost similar to programming scripts except that you don't need to be a developer to create them. You simply use a graphical user interface to point and click to define the model. The example below shows how easy it is to create the model with the Modeler.
Create a New Model
- Start gvSIG OADE 2010. Load and display a vector polygon layer e.g. C:\data\States.shp.
- Click the Modeler icon in the tool bar.
The Modeler dialog box appears. - In the Inputs tree, double click on Vector layer.
A dialog box appears. - In the combo box, choose Polygons. Click OK.
The Vector layer1 icon appears in the Modeler dialog box. - Click the Procedures tab. Under the Procedures | Algorithms tree, expand the Tools for polygon layers node. Double click Centroids.
A dialog box pops up. - Click OK.
A Centroids icon appears connected to the Vector layer1 icon in the Modeler dialog box. - Under the Procedures | Algorithms tree, expand the Tools for point layers node. Double click Add coordinates to points.
A dialog box appears.
- Toggle on Keep as final result.
- Optional. In the Name field, type in the output point layer name.
- Click OK.
The Add coordinates to points icon is displayed connected to the Centroids icon in the Modeler dialog box.
Note: To save the model, click Save and specify the output file path and name.
Running a Model
- Click Run.
The [Model] dialog box appears. - In the Inputs Vector layer field, choose a polygon layer e.g. States.shp.
- Optional. In the Outputs field, type in a new output Shape file path and name.
- Click OK.
The processes defined by the model is executed and the output layer(s) is created. - Close the Run model dialog box.
- Optional. To review the centroid point coordinates, select the newly created layer in the legend and choose Layer | Show attribute table.
The attribute table appears as shown below. Note the two newly created X and Y attribute fields.
Monday, April 16, 2012
Show Geographic Grid Google Mapplet
I spent some time to put together this Google Mapplet that simply shows the latitude and longitude geographic grid lines and labels on Google Maps. The grid lines and labels will display and adjust themselves dynamically as you zoom in and out; from every few degrees until every second.
The screenshot below shows the grid lines and labels at the finest 1 second resolution.
To run this mapplet, just go to the site http://dominoc925-pages.appspot.com/mapplets/gridgeo.htm.
The screenshot below shows the grid lines and labels at the finest 1 second resolution.
To run this mapplet, just go to the site http://dominoc925-pages.appspot.com/mapplets/gridgeo.htm.
Monday, April 9, 2012
Using gvSIG's Geographic Transformation on a raster file
gvSIG has a Photoshop-like tool that can be used to perform geometric transformations on raster files. Transformations such as translation, rotation, scaling, and skewing can be applied interactively to a raster file. The example below illustrates the Geographic Transformation command.
Start the Transformation command
Save the transformation
Start the Transformation command
- Run gvSIG OADE 2010. Load and display a raster file.
- In the toolbar, locate the Geographic transformation icon as shown below.
- Then locate and click the Transformation icon as shown below.
The Transformation dialog box appears.
Note: the raster layer can be transformed either by changing the values in the Transformation dialog box or by graphically adjusting the image in the map view. - In the Transformation dialog box, click the Center raster layer in view icon.
The raster layer is scaled, moved and centered in the map view.
Moving the raster image
- In the map view. move the cursor to the middle of the raster image.
The cursor becomes a hand. - Press down the mouse left button and drag the image.
The raster image is moved to another location.
Skew the image in the Y-axis direction
- Move the cursor to the vertical sides of the raster image.
The cursor changes to an arrow with a Y label. - Press down the left mouse button and drag the image along the Y axis.
The image is skewed in the Y-axis direction.
Skew the raster image in the X-axis direction
- Move the cursor to the horizontal sides of the raster image.
The cursor changes to an arrow with the label X. - Press down the left mouse button and drag the image in the X-axis direction.
The raster image becomes skewed in the X-axis direction.
Rotate the raster image
- Move the cursor to any corners of the raster image.
The cursor changes to a rounded arrow. - Press down the left mouse button and drag the image around the corner.
The raster image is rotated.
Resize the raster image
- Move the cursor along the sides and corners of the raster image.
The cursor changes to a two-headed arrow. - Press down the left mouse button and drag the image inwards or outwards.
The raster image is resized.
Save the transformation
- In the Transformation dialog box, click the Save transformation icon.
The message appears.
- Click Yes.
The adjustments are saved.
Monday, April 2, 2012
Georereference a raster file in gvSIG
There is a function in gvSIG that you can use to georeference any raster images such as scanned images, or photos. The gvSIG georeference function will create world files and other georeferencing metadata information that can be used only with gvSIG apparently. The georeference function has a field to specify the output georeference file but the file is never created. If you want to register raster images for use in gvSIG, then the example below demonstrates the procedure.
Load reference layers and setup the georeferencing views
Load reference layers and setup the georeferencing views
- Start gvSIG. Load and display any geographic features that can be used to aid the georeferencing.
- Select Tools | Georeferencing.
The Georeferencing dialog box appears. - If necessary, toggle on With reference map. Choose a Map view e.g. Untitled - 0.
- In the File to georeference field, click Select.
The Open dialog box appears. - Browse to the raster file e.g. C:\Temp\georef\spiritlakegeology.sid. Click Open.
- If necessary, toggle on Affine transformation.
- Click Accept.
The Georeferencing views, Zoomed views, and Ground control points (GCP) windows appear.
- In the Ground control points (GCP) window, click the New * icon.
A new row is added to the GCP list. - Use the Zoom icons on the right side of the right Georeferencing view to manipulate the corner of the raster image into the central red box.
Note: I used the Zoom to select area to zoom in closer to the corner; then the Move image icon to move the corner into the red box.
- In the right Zoomed view, click on the raster image corner.
A numbered GCP cross is displayed at the clicked location.
- Use the Zoom icons on the right side of the left Georeferencing view to manipulate the corresponding point of the referencing layers to the central red box.
- In the left Zoomed view, click on the corresponding corner point.
A numbered GCP cross is displayed at the clicked point. - Repeat the previous steps 1 to 5 to add in at least 3 GCP points for (Affine transformation).
Note: If the RMS values in the Ground control points (GCP) window is very large, it may be necessary to edit the control points.
Applying the transformation
- In the Ground control points (GCP) window, click the Apply icon.
The raster image is warped into the left Georeferencing view.
- In the Ground control points (GCP) window, click the Exit (and save) icon. Click Yes to the prompts.
The following prompts appear.
The raster image is warped and displayed in the map view.