GIS Concepts: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(URLs updated)
 
(72 intermediate revisions by 10 users not shown)
Line 1: Line 1:
==Geodesy (Projections and Datums)==
== Geodesy and Cartography ==
===Background material===
=== Background material ===


* An introduction to Geodesy from NOAA: http://oceanservice.noaa.gov/education/kits/geodesy/welcome.html
* [http://oceanservice.noaa.gov/education/kits/geodesy/welcome.html An introduction to Geodesy] from NOAA
* Wikipedia's Geodesy entry: http://en.wikipedia.org/wiki/Geodesy
* [http://en.wikipedia.org/wiki/Geodesy Wikipedia's Geodesy entry]
* Wikipedia's GIS entry: http://en.wikipedia.org/wiki/GIS
* [http://en.wikipedia.org/wiki/GIS Wikipedia's GIS entry]
* NGA Geodesy and Geophysics publications: http://earth-info.nima.mil/GandG/pubs.html
* [http://www.nga.mil/portal/site/maritime/ Bowditch's American Practical Navigator] - (especially chapter 2)
* An introduction to geodetic datums by Peter Dana: http://www.colorado.edu/geography/gcraft/notes/datum/datum.html
* [http://earth-info.nima.mil/GandG/publications/ NGA Geodesy and Geophysics publications]
* Map projection concepts by Carlos Furuti: http://www.progonos.com/furuti/MapProj/CartIndex/cartIndex.html
* [http://www.ordnancesurvey.co.uk/oswebsite/gps/information/coordinatesystemsinfo/guidecontents/index.html UK Ordnance Survey primer on coordinate system concepts] ([http://www.ordnancesurvey.co.uk/gps/docs/A_Guide_to_Coordinate_Systems_in_Great_Britain.pdf PDF])
* Clifford J Mugnier's [https://www.asprs.org/asprs-publications/grids-and-datums Grids and Datums column from PE&RS] containing detailed descriptions of many national projections & datums


===Map projections===
=== Map projections ===


* UTM Zones: http://www.dmap.co.uk/utmworld.htm
* [http://www.mapref.org/ MapRef] - The Collection of Map Projections and Reference Systems for Europe
* EPSG Codes: http://www.epsg.org
* [http://www.remotesensing.org/geotiff/proj_list/ Projections Transform Lists] (PROJ4)
* [http://www.dmap.co.uk/utmworld.htm UTM Zones]
 
EPSG:
* [http://www.epsg.org EPSG projection codes]
* [http://www.epsg-registry.org/ EPSG database search]
* [http://spatialreference.org/ Spatialreference community portal]
 
Projection galleries:
* [http://www.progonos.com/furuti/MapProj/CartIndex/cartIndex.html Map projection concepts] by Carlos Furuti
* [http://www.csiss.org/map-projections/index.html Map projection gallery] by Paul Anderson ([http://www.galleryofmapprojections.com/ old link])
<!-- retained the old link as new one seems to lead to a dead server -->
 
=== Map datums ===
 
An extra calculation is needed when re-projecting maps and data between
two different co-ordinate systems (in addition to the re-projection) if
the two co-ordinate systems are based on different models of the
curvature of the earth. E.g. OSGB36 uses the Airy ellipsoid and WGS84 uses the WGS84 ellipsoid, which have slightly different sizes and shapes. The error is not large - generally a few hundred metres at most on the ground.
The datum transformation parameters describe this adjustment
mathematically.
 
As the transformation between any two datums is approximate and varies by location, different sets of parameters are often offered to give improved accuracy in different regions of a country. In general there is no one "correct" set of transformation parameters - indeed the accuracy changes over time due to tectonic movements in the Earth.
 
* [http://sourceforge.net/mailarchive/forum.php?thread_name=1190060064.27461.57.camel%40blackpad&forum_name=jump-pilot-devel A brief history of map datums] for the layman
* [http://www.colorado.edu/geography/gcraft/notes/datum/datum.html An introduction to geodetic datums] by Peter Dana
* [http://home.online.no/~sigurdhu/WGS84_Eng.html How WGS 84 defines the Earth]
* A discussion of [http://www.linz.govt.nz/geodetic/conversion-coordinates/geodetic-datum-conversion/nzgd1949-nzgd2000/index.aspx 3-term, 7-term, and NTv2 grid datum transformations] by Land Information New Zealand
: (besides the web page have a look at the PDF fact sheet and guide linked therein)
<!-- old (better?>) link: http://web.archive.org/web/20070828042606/http://www.linz.govt.nz/core/surveysystem/geodeticinfo/geodeticdatums/nzgd49tonzgd2000/index.html -->
* Vertical datum files: http://download.osgeo.org/proj/vdatum/


==How GRASS deals with geodetics==
==How GRASS deals with geodetics==


* modified use of the PROJ.4 library: http://proj.maptools.org
As far as GRASS is concerned, an ellipsoid and a spheroid are the same thing, and ellipsoid is the prefered name.
 
As far as GRASS is concerned, a datum is made up of an ellipsoid and an origin.
Setting a datum is optional, but highly recommended.
 
GRASS uses the [https://proj.org PROJ] library.
 
=== Modules controling a location's map projection ===
* {{cmd|g.proj}} help page
 
=== Modules for reprojecting GIS maps and data ===
 
* {{cmd|r.proj}} for reprojecting raster maps
* {{cmd|v.proj}} for reprojecting vector maps
* {{cmd|m.proj}} for reprojecting a list of coordinate pairs
 
=== Modules for georectifying images ===
 
* {{cmd|r.region}} for resetting a raster map's bounds information
* gis.m GIS manager GeoReferencing tool (File menu)
* {{cmd|i.points}} and {{cmd|i.vpoints}} for setting GCPs
* {{cmd|i.rectify}} for georectifying imagery
* [http://www.gdal.org gdalwarp] (use with gdal_translate, see the i.warp script in the wiki [[GRASS_AddOns#Imagery_add-ons|AddOns]] page)
 
;[[Georeferencing]]


[http://grass.itc.it/grass60/manuals/html60_user/g.proj.html G60:g.proj] help page (GRASS 6.0)
 
[http://grass.itc.it/grass60/manuals/html60_user/g.setproj.html G60:g.setproj] help page (GRASS 6.0)
 
[http://grass.itc.it/grass60/manuals/html60_user/r.proj.html G60:r.proj] help page (GRASS 6.0)
 
[http://grass.itc.it/grass60/manuals/html60_user/v.proj.html G60:v.proj] help page (GRASS 6.0)
 
==GIS Data types==
==GIS Data types==


Line 31: Line 78:


Data which occurs in a regularly spaced grid. e.g. a satellite image or digital terrain map.<BR>
Data which occurs in a regularly spaced grid. e.g. a satellite image or digital terrain map.<BR>
Region settings determine the spatial extent and resolution of the grid. (see G60:g.region)
Region settings determine the spatial extent and resolution of the grid.
 
;{{cmd|rasterintro}}
 
[[GRASS Raster Mask]]


http://grass.itc.it/grass61/manuals/html61_user/rasterintro.html
[[GRASS raster semantics]]


===3D Raster Data===
===3D Raster Data (Voxel)===


A stack of 2D raster maps.
A stack of 2D raster maps.


http://grass.itc.it/grass61/manuals/html61_user/raster3dintro.html
;{{cmd|raster3dintro}}
 
G61:raster3dintro


===Vector Data===
===Vector Data===


Data which occurs as a series of coordinates. e.g. a GPS position or coastline map. May be a point, line, area, etc in either 2D or 3D space.<BR>
Data which occurs as a series of coordinates. e.g. a GPS position or coastline map. May be a point, line, area, etc in either 2D or 3D space. Generally independent of region settings.
Generally independent of region settings.


http://grass.itc.it/grass61/manuals/html61_user/vectorintro.html
;{{cmd|vectorintro}}
[[Vectordata]]


===Imagery Data===
=== Imagery Data ===
Pixelated photographic or satellite images, often imported from a  
Pixelated photographic or satellite images, often imported from a  
[[http://en.wikipedia.org/wiki/GeoTIFF GeoTIFF]] or PNG image file.<BR>
[http://en.wikipedia.org/wiki/GeoTIFF GeoTIFF] or PNG image file.
As far as the GIS is concerned this is just another raster map, but there are several modules specially tailored for rectification and processing common imagery types. e.g. ortho-photos or multi-channel LANDSAT data.


http://grass.itc.it/grass61/manuals/html61_user/imageryintro.html
As far as the GIS is concerned this is just another raster map, but there are several modules specially tailored for rectification and processing common imagery types. e.g. ortho-photos or multi-channel [[LANDSAT]] data.


===Site Data===
* {{cmd|imageryintro}}
Old versions of GRASS (5 and earlier) treated point data separate to line and polygon data. GRASS 6 classes all vector data features the same. Convert old sites file data into GRASS 6 vector format with the G60:v.in.sites or G60:v.in.sites.all modules.
 
* The GRASS [[Image processing]] wiki page
 
=== Old GRASS GIS 5 / 6 Site Data===
Old versions of GRASS (5 and earlier) treated point data separate to line and polygon data. GRASS 6 classes all vector data features the same. Convert old sites file data into GRASS 6 vector format with the GRASS 6 {{cmd|v.in.sites}} or  
{{cmd|v.in.sites.all}} modules.


==Conversions between data types==
==Conversions between data types==


The following table is intended to catalog transformations from one type of data to another:
The following table is intended to catalog transformations from one type of data to another:<BR>
''[table is currently incomplete!]''


{| border="1"
{| border="1"
|
| From / To
! From \ To
!{{cmd|rasterintro}}
|[http://grass.itc.it/grass61/manuals/html61_user/rasterintro.html Raster]
!{{cmd|raster3dintro}}
|[http://grass.itc.it/grass61/manuals/html61_user/raster3dintro.html 3D Raster]
!{{cmd|vectorintro}}
|[http://grass.itc.it/grass61/manuals/html61_user/vectorintro.html Vector]
|[http://grass.itc.it/grass61/manuals/html61_user/imageryintro.html Imagery]
| Site
|-
|-
! Raster
! Raster
| r.mapcalc
| r.mapcalc
|
| r.to.rast3
| r.to.vect, v.sample, r.volume
|-
! 3D Raster
| r3.to.rast, r3.cross.rast
| r3.mapcalc
|  
|  
| v.sample, r.volume, r.to.vect
|
| X
|-
! 3d Raster
|
|
|
|
|
| X
|-
|-
! Vector
! Vector
| v.to.rast, v.surf.rst, v.surf.idw
| v.to.rast, v.surf.rst, v.surf.idw
| v.vol.rst, v.vol.idw
| v.vol.rst, v.vol.idw, v.to.rast3
|
| v.clean
|
|
| X
|-
! Imagery
|
|
|
|
|
| X
|-
! Site
|
|
|
|v.in.site
|
| X
|-
|-
! Data
! Data
|r.in.*
| r.in.*
|r3.in.*
| r3.in.*
|
| v.in.*
|
|
| X
|}
|}


Line 128: Line 151:
===The Database===
===The Database===


The directory in which all GIS data is to be stored.<BR>
The directory in which all GIS data is to be stored.
e.g. ~/grassdata/
 
e.g. <tt>~/grassdata/</tt>


===The Location===
===The Location===


An area, project ID, or other grouping of mapsets, all with the same projection settings.<BR>
A ''location'' is a GRASS project consisting of an area, projection definition (or unprojected), a grouping of mapsets, all with the same projection settings. A location is a subdirectory of the GRASS ''database''.
 
e.g. world_lat_lon, utm_zone_59, or west_coast
e.g. world_lat_lon, utm_zone_59, or west_coast
A ''location'' contains one or many ''mapsets''.


===The Mapset===
===The Mapset===


Conceptually may either be split up to refer to different users (each has own mapset to work in), subarea (shire), etc. as needed. There is always a PERMANENT mapset which is readable from all other mapsets within the same location. Access maps in other mapsets with the "@" symbol or the g.mapsets command.
A ''mapset'' contains map(s), it is a subdirectory of a ''location''.
 
Conceptually, if several mapsets are used in a location, they may be assigned to different users (each has one or several own mapsets to work in and cannot modify thos of other users), and/or it they are used to organize a project (''location'') by subareas or subprojects.
e.g. map@othermapset
There are no specific organizational limitations.
 
==How the Open Source software development model works==
 
GRASS differs from many other GIS software used in the professional world in that it is developed and distributed by users for users; mostly on a volunteer basis, in the open, and is given away for free.
 
Emphasis is placed on interoperability and unlimited access to data as well as software flexibility and evolution rate (both added features and bug minimization).
 
''Free'' can have many meanings, as the links below illustrate, and within a project there is often a spectrum of philosophies and goals amongst developers. But it works - Free Software has revolutionized many sectors of the computing world over the last few years and continues to do so today.


* Philosophy of the Free Software Movement: http://www.gnu.org/philosophy/philosophy.html
There is always a PERMANENT mapset which is readable from all other mapsets within the same location. Read access to maps in other mapsets is managed with the 'g.mapsets' command or by adding the "@" symbol and mapset name (e.g. <tt>map@othermapset</tt>).
* The Open Source Initiative has a good explanation: http://www.opensource.org
* The Free Software Foundation: http://www.fsf.org
* The GNU General Public License: http://www.gnu.org/copyleft/gpl.html


==Raster GIS Analysis==
==Raster GIS Analysis==
Line 159: Line 175:
===Simple Raster Math===
===Simple Raster Math===


Sometimes when analyzing the relationship between two or more raster data sets, a relatively simple mathematical approach is best. One example using the r.mapcalc tool would be to look at changes between two raster data sets. By subtracting the values in these two data sets you can assume that resulting cells with a positive value have a possitive change and those with a negative value have negative change.  If the cell values have a zero value then there would be no change.
Sometimes when analyzing the relationship between two or more raster data sets, a relatively simple mathematical approach is best. One example using the {{cmd|r.mapcalc}} tool would be to look at changes between two raster data sets. By subtracting the values in these two data sets you can assume that resulting cells with a positive value have a positive change and those with a negative value have negative change.  If the cell values have a zero value then there would be no change.
 
GRASS comes bundled with the {{cmd|r.mapcalc}} command line tool as well as a GUI interface for the tool accessible using the {{cmd|r.mapcalculator}} command.  This GUI allows the user to easily assign raster maps to the variables used in the formulas and easily create mathematical strings that will result in a new raster data set containing the results.


GRASS comes bundled with the G61:r.mapcalc tool as well as the G61:d.m GUI interface for the tool accessable using the r.mapcalculator command.  This GUI allows the user to easily assign raster sets to the variables used in the formulas and easily create mathematical strings that will result in a new raster data set containing the results.
[[Category:Community]]
[[Category:Raster]]
[[Category:Vector]]

Latest revision as of 16:19, 30 December 2019

Geodesy and Cartography

Background material

Map projections

EPSG:

Projection galleries:

Map datums

An extra calculation is needed when re-projecting maps and data between two different co-ordinate systems (in addition to the re-projection) if the two co-ordinate systems are based on different models of the curvature of the earth. E.g. OSGB36 uses the Airy ellipsoid and WGS84 uses the WGS84 ellipsoid, which have slightly different sizes and shapes. The error is not large - generally a few hundred metres at most on the ground. The datum transformation parameters describe this adjustment mathematically.

As the transformation between any two datums is approximate and varies by location, different sets of parameters are often offered to give improved accuracy in different regions of a country. In general there is no one "correct" set of transformation parameters - indeed the accuracy changes over time due to tectonic movements in the Earth.

(besides the web page have a look at the PDF fact sheet and guide linked therein)

How GRASS deals with geodetics

As far as GRASS is concerned, an ellipsoid and a spheroid are the same thing, and ellipsoid is the prefered name.

As far as GRASS is concerned, a datum is made up of an ellipsoid and an origin. Setting a datum is optional, but highly recommended.

GRASS uses the PROJ library.

Modules controling a location's map projection

Modules for reprojecting GIS maps and data

  • r.proj for reprojecting raster maps
  • v.proj for reprojecting vector maps
  • m.proj for reprojecting a list of coordinate pairs

Modules for georectifying images

  • r.region for resetting a raster map's bounds information
  • gis.m GIS manager GeoReferencing tool (File menu)
  • i.points and i.vpoints for setting GCPs
  • i.rectify for georectifying imagery
  • gdalwarp (use with gdal_translate, see the i.warp script in the wiki AddOns page)
Georeferencing

GIS Data types

Raster Data

Data which occurs in a regularly spaced grid. e.g. a satellite image or digital terrain map.
Region settings determine the spatial extent and resolution of the grid.

rasterintro

GRASS Raster Mask

GRASS raster semantics

3D Raster Data (Voxel)

A stack of 2D raster maps.

raster3dintro

Vector Data

Data which occurs as a series of coordinates. e.g. a GPS position or coastline map. May be a point, line, area, etc in either 2D or 3D space. Generally independent of region settings.

vectorintro

Vectordata

Imagery Data

Pixelated photographic or satellite images, often imported from a GeoTIFF or PNG image file.

As far as the GIS is concerned this is just another raster map, but there are several modules specially tailored for rectification and processing common imagery types. e.g. ortho-photos or multi-channel LANDSAT data.

Old GRASS GIS 5 / 6 Site Data

Old versions of GRASS (5 and earlier) treated point data separate to line and polygon data. GRASS 6 classes all vector data features the same. Convert old sites file data into GRASS 6 vector format with the GRASS 6 v.in.sites or v.in.sites.all modules.

Conversions between data types

The following table is intended to catalog transformations from one type of data to another:
[table is currently incomplete!]

From / To rasterintro raster3dintro vectorintro
Raster r.mapcalc r.to.rast3 r.to.vect, v.sample, r.volume
3D Raster r3.to.rast, r3.cross.rast r3.mapcalc
Vector v.to.rast, v.surf.rst, v.surf.idw v.vol.rst, v.vol.idw, v.to.rast3 v.clean
Data r.in.* r3.in.* v.in.*

How a GRASS project is organized

GRASS data is stored in a three level structure, the database, location and mapset. These can be found in a series of nested directories on the user's computer. All three must exist and are set at GRASS startup time.

The Database

The directory in which all GIS data is to be stored.

e.g. ~/grassdata/

The Location

A location is a GRASS project consisting of an area, projection definition (or unprojected), a grouping of mapsets, all with the same projection settings. A location is a subdirectory of the GRASS database.

e.g. world_lat_lon, utm_zone_59, or west_coast

A location contains one or many mapsets.

The Mapset

A mapset contains map(s), it is a subdirectory of a location. Conceptually, if several mapsets are used in a location, they may be assigned to different users (each has one or several own mapsets to work in and cannot modify thos of other users), and/or it they are used to organize a project (location) by subareas or subprojects. There are no specific organizational limitations.

There is always a PERMANENT mapset which is readable from all other mapsets within the same location. Read access to maps in other mapsets is managed with the 'g.mapsets' command or by adding the "@" symbol and mapset name (e.g. map@othermapset).

Raster GIS Analysis

Simple Raster Math

Sometimes when analyzing the relationship between two or more raster data sets, a relatively simple mathematical approach is best. One example using the r.mapcalc tool would be to look at changes between two raster data sets. By subtracting the values in these two data sets you can assume that resulting cells with a positive value have a positive change and those with a negative value have negative change. If the cell values have a zero value then there would be no change.

GRASS comes bundled with the r.mapcalc command line tool as well as a GUI interface for the tool accessible using the r.mapcalculator command. This GUI allows the user to easily assign raster maps to the variables used in the formulas and easily create mathematical strings that will result in a new raster data set containing the results.