Geotools Learning (referencing)

Source: Internet
Author: User

Introduce geotools as instructed by JTs. The packages written in the geotools API are explained.

There are several important concepts in package referencing, such as coordinate system; coordinate referencing system; datum. Coordinate system is used to build a coordinate system. Coordinate referencing system is a space coordinate reference system used to represent geospatial data. datum is used to represent data collection and formation. I checked the information and found a good article. The excerpt is as follows:

I was going to write this article, because I was also vague about these concepts. I will not be able to learn it until I understand it.GIS It has been many years. Many people are still confused. However, you don't need to write this article. The author of sharpmap has a much shorter length than I planned, but the concepts are clear.

Reprinted from: http://www.sharpgis.net/2007/05/05/SpatialReferencesCoordinateSystemsProjectionsDatumsEllipsoidsConfusing.aspx

People are often mixing the above as if they were one and the same, so here's a recap of them. one of the things you often find people saying is that "my data is in the WGS84 Coordinate System ". this doesn't really make sense, but I will get back to this later.

This is a very confusing subject, and I might have gotten a few things wrong myself, so please add a comment and I'll update it ASAP.

Coordinate Systems

A coordinate system is simply put a way of describing a spatial property relative to a center. There is more than one way of doing this:

  • The geocentric coordinate system is based on a normal (x, y, z) Coordinate System with the origin at the center of Earth. This is the system thatGPS Uses internally for doing it calculations, but since this is very unpractical to work with as a human being (due to the lack of well-known concepts of east, north, up, down) it is rarely displayed to the user but converted to another coordinate system.
  • The spherical coordinate system is probably the most well-known. it is based on angles relative to a prime meridian and equator usually as longdistance and latitude. heights are usually given relative to either the mean sea level or the datum (I'll get back to the datum later ).
  • The Cartesian coordinate system is defined as a "flat" coordinate system following the curvature of the Earth. it's not flat in the sense that it usually follows the Earth's curvature in one direction and has a known scale-error in the other direction relative to the distance of the origin. the most well-known coordinate system is the Universal Transverse Mercator (UTM), but surveyors define their own little local flat coordinate systems all the time. it is very easy to work with, pretty accurate over small distances making measurements such as length, angle and area very straightforward. cartesian coordinate systems are stronugly connected to projections that I will cover later.

Datums and ellipsoids

Some of the common properties of the above coordinate systems are that they are all relative to the center of Earth and should t the geocentric coordinate system, uses a height system relative to the surface of the Earth.

This poses two immediate problems:

  • Where is the center of the earth
  • What is the shape of the earth?

By now most people shoshould know that the Earth isn't flat (although there are still some who doubts it ). if we define the surface of Earth as being at the mean sea level (often referred to as the geoid), we don't get a spheroid or even an ellipsoid. because of gravitational changes often caused by large masses such as mountain ranges etc, Earth is actually very irregular with variations of +/-100 meters. since this is not very practical to work with as a model of Earth, we usually use an ellipsoid for approximation. the ellipsoid is defined by its semi-major axis, and either the flattening of the semi-minor axis.

The center and orientation of the ellipsoid is what we call the datum. so the datum defines an ellipsoid and through the use of a set of points on the ground that we relate to points on the ellipsoid, we define the Center of the Earth. this poses another problem, because continental drift moves the points used to define the points around all the time. this is why the name of a datum usually have a year in it, often referring to the position of those points January 1st of that year (although that may vary ).

There are a vast amount of datums, some used for measurements all over the world, and other local datums defined so they fit very well with a local area. some common ones are: World Geodetic Datum 1984 (WGS84), European Datum 1950 (ED50) and North American datum 1983 (nad83 ).

The most well-known is WGS84 used by the GPS systems today. it is a good approximation of the entire world and fix-points defined almost all over the world. when it was defined they forgot to include points in Europe though, so the Europeans now have their own etrs89, which is usually referred to as the "realization of WGS84 in Europe ". the problem here was solely because of continental drift, so they defined some points relative to WGS84 in 1989, and keeps track of the changes. in most use-cases it is of no real importance and you can use one or the other.

I mentioned earlier that people often refer to having their data in WGS84, And you see now why this doesn't make sense. all you know from that is that the data is defined using the WGS84 datum, but you don't know which coordinate system it uses.

Projections

The Earth isn't flat, and there is no simple way of putting it down on a flat paper map (or these days a flat screen ), so people have come up with all sorts of ingenious solutions each with their pros and cons. some preserves area, so all objects have a relative size to each other, others preserve angles (conformal) Like the Mercator projection, some try to find a good intermediate mix with only little distortion on several parameters etc. common to them all is that they transform the world onto a flat Cartesian coordinate system.

A common statement that I hear in GIS is the following "My map doesn't have a projection", but this is simply not possible (unless you have a good old Globe ). often people are referring to data that is in longpolling/latitude and displayed on a map without applying any projection. what happens is that the system applies the simplest projection it can: Mapping longpolling directly to X and latitude to y. this results in an equirectangular projection, also called the "plate carree" projection. it results in very heavy distortion making areas look squashed close to the poles. the "opposite" of the plate carree is the Mercator projection which stretches areas close to the Poles in the opposite direction, making them look very big. this is the type of projection you see used on live maps,Google Maps and Yahoo Maps, but as too often mistakenly thinks, they do not use wgs84.

Spatial Reference

The spatial reference is a combination of all the above. it defines an ellipsoid, a datum using that ellipsoid, and either a geocentric, geographic or projection. the projection also always has a geographic coordinate system associated with it. the European Petroleum Survey Group (epsg) has a huge set of predefined spatial references, each given a unique ID. these ID's are used throughout the industry and you can download an Access database with all them from their website, as well as some very good clients on projection.

So when you hear someone saying they have their data in WGS84, you might as well assume they have longpolling/latitude data in WGS84 projected using plate carree. the spatial reference ID of this is epsg: 4326.

Spatial references are often defined in a well-known format defining all these parameters. The spatial reference epsg: 4326 can therefore also be written:

Geogcs ["gcs_wgs_1984", datum ["d_wgs_1984", spheroid ["wgs_1984", 6378137,298.257223563], primem ["Greenwich", 0], Unit ["degree", 0.0174532925199433]

Live/Google/Yahoo Maps use a Mercator projection, but although their datum is based on WGS84, they use a sphere instead of an ellipsoid. this means that they use the same center and orientation as WGS84, but without applying any flattening. the spatial reference string for their projection therefore becomes:

Projcs ["Mercator", geogcs ["wgs84_sphere", datum ["wgs84_sphere", spheroid ["GRs 1980 authalic sphere", 6378137, infinity, authority ["epsg ", 7048 "], towgs84 [0, 0, 0, 0, 0, 0], primem [" Greenwich ", 0, authority [" epsg ", "8901"], Unit ["degree", 0.0174532925199433, authority ["epsg", "9102"], axis ["E", East], axis ["N", North], projection ["mercator_1sp"], parameter ["false_easting", 0], parameter ["false_northing", 0], parameter ["central_meridian", 0], parameter ["latitude_of_origin", 0], Unit ["metre", 1, authority ["epsg", "9001"], axis ["East", East], axis ["North", North]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.