转自:http://www.sharpgis.net/2007/05/05/SpatialReferencesCoo
rdinateSystemsProjectionsDatumsEllipsoidsConfusing.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 that GPS 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 Longitude 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 strongly 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 except 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 should know that 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 longitude/latitude and displayed on a map without applying any projection. What happens is that the system applies the simplest projection it can: Mapping Longitude 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 many 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 documents on projection.
So when you hear someone saying they have their data in WGS84, you might as well assume they have longitude/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 as:
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, 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]]
分享到:
相关推荐
总结来说,《GeoTools汉语版资料》为中文用户提供了一个全面的GeoTools学习平台,涵盖了从基础概念到高级应用的各种资源,无论是初学者还是有经验的开发者都能从中受益。通过阅读和实践这些文档,开发者可以有效地...
- **MyGeoTools.doc**:这可能是一份个人整理的GeoTools学习笔记,包含了使用GeoTools开发GIS应用的关键概念和代码示例。 - **MyGeoTools.mht**:可能是另一种格式的学习资料,MHT是单个文件的Web档案,可能包含...
**Geotools API核心概念**: 1. **Module体系**:Geotools由多个模块组成,每个模块专注于特定的功能,如数据读取(JDBC、Shapefile)、投影转换、几何操作等。 2. **DataStore**:数据存储接口,用于连接和访问各种...
本文将深入探讨Geotools的基本概念、主要功能以及如何利用其进行坐标转换,帮助开发者更好地理解和运用这个强大的工具。 Geotools是一个开源的Java库,其设计目标是为Java程序员提供访问和操作地理空间数据的能力。...
在本指南中,我们将详细介绍GeoTools的基本概念、库函数、插件、扩展模块、下载说明和代码说明等方面的知识点,为初学者提供一个入门指南。 库函数介绍 GeoTools提供了多种库函数,帮助开发者实现GIS应用程序的各...
《地理编码工具类——geotools的深度解析》 在信息技术日益发达的今天,地理信息系统(GIS)在各个领域中的应用越来越广泛。其中,geotools作为一款强大的开源Java库,为开发者提供了丰富的地理编码和空间分析功能...
在使用GeoTools时,开发者需要了解基本的GIS概念,如坐标系统、投影转换、几何对象等。此外,熟悉Java编程语言和面向对象设计也是必不可少的。GeoTools提供了丰富的API文档和示例代码,帮助开发者快速上手。 对于...
2. Feature:Feature是GeoTools中表示地理实体的概念,它包含一组属性(Attributes)和几何对象(Geometry)。属性可以是任何类型,几何对象则表示Feature的空间位置。 3. MapContext:MapContext是GeoTools中用来...
在 GeoTools 中,核心概念包括: 1. **数据存储(Data Stores)**:GeoTools 支持多种数据存储方式,如文件系统、数据库等。每个数据存储都有相应的适配器,例如,ShapefileDataStore 用于读写 ESRI 的 Shapefile ...
GeoTools是一个基于Java的开源GIS(地理信息系统)库,它为开发者提供了丰富的API和功能,以便于构建地理信息相关的应用程序。这个"geotools20.0-bin.zip"压缩包包含的是GeoTools的20.0版本,这是一个稳定且功能强大...
为了更好地使用GeoTools,你需要熟悉Java编程,并对GIS的基本概念有一定了解。GeoTools的API设计得相对复杂,因为它覆盖了大量的GIS功能,因此建议参考其官方文档和示例代码来学习如何使用。此外,理解OGC规范对于...
《GeoTools 23.0 用户指南:解锁地理信息系统开发的宝藏》 GeoTools 是一个开源的 Java 库,专门用于构建地理信息系统(GIS)应用。这个库提供了大量的工具和接口,使得开发者能够轻松地处理空间数据,进行地图绘制...
使用GeoTools进行开发时,你需要了解以下几个关键概念: - **DataStore**:这是GeoTools中的一个核心接口,代表了数据源,可以是文件系统中的Shapefile、数据库中的表或是网络上的WFS服务。 - **FeatureType**:表示...
标题中的“gt-jdbc-2.6.5.jar”是一个Java数据库连接(JDBC)驱动程序,用于连接Oracle数据库,并且是Geotools项目的一部分。Geotools是一个开源的Java库,专门用于处理地理空间数据,它提供了丰富的API来操作和展示...
6. **理解GeoTools核心概念**: GeoTools的核心组件包括数据存储(DataStore)、特征集(FeatureType)、特征(Feature)和地图(Map)。你需要理解如何使用这些组件来加载、查询和显示地理数据。 - **DataStore**:...
核心功能 1.定义关键空间概念和数据结构的接口 Java 拓扑套件(JTS)提供的...用于 ImageIO-EXT 项目的插件,允许 GeoTools 从 GDAL 读取其他栅格格式 7.GeoTools 扩展 提供使用核心库的空间设施构建的其他功能。
7. **图层管理**:GeoTools 提供了图层的概念,可以将不同数据源的数据组织成逻辑上的图层,并控制它们的显示顺序、透明度等属性。 8. **工具类库**:除了核心组件,GeoTools 还包含一系列辅助工具,如图形绘制、...
同时,由于`geotools`和`vividsolutions`都是Java库,开发者需要熟悉Java编程,并理解GIS的基本概念,如空间参考系统、几何对象和空间操作。 总的来说,利用`gi`根据经纬度解析城市名是一项结合了地理空间数据处理...
在学习GeoTools API时,首先应了解基本概念和术语,然后深入到各个模块,例如数据读写模块、地图渲染模块等。通过阅读“GeotoolsAPI电子书.chm”中的内容,你可以找到详细的API参考、示例代码和教程,这将有助于理解...
1. **GIS基础**:理解GIS的基本概念,包括空间数据、地理坐标系统、投影变换等,是使用GEOTOOLS的前提。 2. **GEOTOOLS API**:熟悉GEOTOOLS提供的各种API,如DataStoreFactoryBean用于数据存储,MapContent用于地图...