¡Esta es una revisión vieja del documento!
Es la forma de integrar datos geográficos en un ordenador (hardware + software) para su captura, almacenaje, manipulación, análisis… Es decir, es una forma de aprovechar la informática para el despliegue y uso de la geografía; por ejemplo, mediante estos sistemas se podrían calcular tiempos de respuesta en caso de desastre natural en una zona, analizar las tendencias de los habitantes de la población para utilizar el transporte público…
.shp que contiene los datos geográficos en formato vectorial..shx es el fichero índice, por cada registro en el .shp hay uno en este..dbf contiene los datos enlazados y no geoespaciales en formato dBASE (legible por MS Excell)..prj que indica la proyección del fichero y está escrito en WKT.
Un mapa de la tierra la proyecta a partir de un eje de coordenadas cartesianas donde la horizontal, x, es denominada latitud y la vertical, y, se denomina longitud; si dividimos la esfera en línias paralelas horizontales (latitud) tendremos una que la divide en dos denominada ecuador y las demás, los paralelos, se numeran del 0 al 90 positivamente las que van hacia el norte y del 0 al -90 las que van al sur. Los meridianos son las línias paralelas a la longitud, estos por la forma de la tierra acaban convergiendo en los polos norte y sur, los meridianos que van hacia el este son numerados del 0 al 180 y los que van al oeste del 0 al -180 siendo el 0 el meridiano de Greenwich.
Debido a que no existe una tercera dimensión al mostrar un mapa sobre un plano se acaba deformando dicho mapa (la unión de meridianos y paralelos forman cuadrados perfectos) se realiza una proyección sobre dicho plano de lo que se quiere mostrar intentando minimizar al máximo posible las distorsiones (de distancia, de dirección, de forma y de área) que puedan ocurrir. Existen varios tipos de proyecciones, aunque no por ello hay una mejor que otra sino que cada una minimiza una distorsión concreta, y cuando estes montando un mapa asegurate que todas las capas utilizan la misma proyección.
La proyección Mercator es la más utilizada (esencialmente es la que utiliza en las clases y muy parecida a la de Google Maps). Se basa en un plano cartesiano modificado brevemente, muestra la distribución del planeta pero no hace lo correcto con las distancias.
Otro de los problemas existentes es que la Tierra no es completamente esférica (sino con un poco de matemáticas podríamos calcular distancias). Podríamos decir que la forma que tiene el planeta Tierra es de geoide (debido a que por efectos de la gravitación y de la fuerza centrífuga producida al rotar sobre su eje se genera el aplanamiento polar y el ensanchamiento ecuatorial). Un DEM (Digital Elevation Model) es una representación digital del la superficie terrestre, también es conocido el DTM (Digital Terrain Model).
Un datum es un concepto que puede ser tangible (visible) o simplemente teórico y corresponde a la zona (forma geométrica) correspondiente al área de estudio. Por ejemplo el North American Datum de 1983 (NAD83) corresponde a una forma elipsoide GRS80.
Los sistemas de coordenadas (o coordinate reference system (CRS)) son la forma de posicionar los pares x,y. Existen varias formas de expresarlos:
El conjunto de datum, sistema de coordenadas y proyección que corresponden a datos espaciales se les denomina GEOGCS (Geographic Coordinate System) o GCS si no están proyectados.
Scale and Resolution in the Analog World When dealing with paper maps, pixels aren’t of much use to us as a unit of measure; the size of your map is generally measured in inches or centimeters. However, the physical size of your map is only half of the equation—you’ll still want to know how much ground space the paper map represents. What you’re looking for is the scale of the map. This is commonly expressed as a ratio: 1:1000 means that 1 unit on the map is equivalent to 1,000 of those same units on the ground. This notion of ratios comes up again and again in cartography. For example, let’s say you have a 30 cm by 30 cm (1 foot by 1 foot) paper map that shows you a 30 km by 30 km (18.6 miles by 18.6 miles) area on the ground. Our map scale is 30:3,000,000. That looks bit odd, doesn’t it? Map scales are usually reduced so that the left side of the ratio is 1. Dividing both sides of the ratio by 30 gives us a more normal-looking map scale of 1:100,000—1 cm on the map represents 100,000 cm on the ground. To further refine this ratio, 100,000 cm is really 1,000 m, which is 1 km. You might see a scale for this hypothetical map expressed as “1 centimeter on the map rep- resents 1 kilometer on the ground,” but the least ambiguous way to express the scale is to say simply it is 1:100,000 and leave the inter- pretation up to the reader. Now let’s say that you want to see a bigger area of the earth on your map. If you want to see twice as much ground space per side (60 km), you have two options: you could double the physical size of your map to 60 cm, or you could cram 60 km into the same 30 cm map. In the first case, you are maintaining the same scale as the earlier map. If you hold the size of your map constant, something has got to give. That something is the level of detail or the resolution of the map. Your effective scale is now 1:200,000 (1 cm on the map represents 2 km on the ground). You have a lower-resolution map—in other words, you can see less detail. If you move in the opposite direction—increasing your resolution— either your map will get progressively larger or you will be able to see less total ground space on the same-sized map. Do you see how if you hold the size of your map constant, there is an inverse relationship between the resolution and the total ground space? You can see either less total earth at a higher level of detail or more total earth at a lower level of detail. (This should remind you of our imaginary basketball globe story earlier in the book.) This magic ratio explains why statewide highway maps are so darn big. They have to be 2 to 3 feet on a side to display all of the highways at a resolution that you can see easily. But highway map resolution doesn’t allow you to navigate your way through local neighborhoods; no single piece of paper could realistically hold that level of detail. If you’ve ever been out house hunting in your real estate agent’s car, the agent probably has a thick neighborhood guide that fits ten to twelve city blocks to a standard 8.5 by 11 page. Scale and Resolution in the Digital World Let’s now move our focus back to digital mapping. Digital images are measured in pixels (a combination of the two words picture element). Pixels are like degrees in that they are a relative unit of measure when it comes to distance. For example, my laptop screen optimally runs at a resolution of 1280 by 854. I have a 15-inch PowerBook G4, so we can figure out the dots per inch (DPI) of my monitor using some pretty simple math: 1,280 pixels divided by 15 inches gives me a DPI of about 85. (Historically, people have used 72 DPI as a benchmark for computer displays, but as you’ll see in a moment that number can be changed with the click of a button.) I use my laptop for presentations quite a bit, but I have yet to find an LCD projector that will allow me to run at native resolution. If I’m lucky, I’ll get knocked down to 1024 by 800, but more often than not, I end up running at 800 by 600. Obviously, the physical size of my laptop screen doesn’t change, but my resolution and corresponding DPI takes a pretty big hit. A 15-inch screen displaying 800 pixels yields a DPI of a little more than 53. Just like my paper map in the previous section, I lose total desktop space (ground space), but I can see everything else in much greater detail (resolution). When I disconnect the projector, my desktop gets much bigger, but my individual icons get much smaller. Looking now at raster images, we still need a way to express “this much on my screen represents this much on the ground.” Unfortu- nately, as we just learned, expressing things in inches or centimeters can be problematic. The only two absolutes we have are the dimensions of the image in pixels and the ground space that each pixel represents. Since you can’t very well measure ground space in pixels, we lose the traditional notion of a scale ratio. Instead, we talk about ground sample distance (GSD). For example, we know that a typical DOQQ is 8,000 pixels across in image space and 8 kilometers across in ground space. This gives us a GSD of 1 meter per pixel. Regardless of your screen resolution, your image resolution will always be 1 pixel = 1 meter. (For more informa- tion on DOQQs, see either Terraserver-USA’s About page7 or the USGS Factsheet.8 Both are chock-full of geobabble that shouldn’t scare you in the least if you’ve made it this far.) Most of the DOQQs date from the mid-1990s. The USGS has been sys- tematically updating its data set with newer, higher-resolution, multi- spectral imagery. The Urban Areas data set generally dates from 2000 and later. Its GSD ranges from 0.5 meters (roughly 1.5 feet) down to 0.15 meters (6 inches). As storage gets cheaper and sensors get more powerful, the USGS will update its data set accordingly. It keeps the DOQQ data set around for now because it has more complete cov- erage of the United States, but eventually the panchromatic country- wide mosaic will be completely replaced by the newer high-resolution imagery. (For more information, see the fact sheet about high-resolu- tion orthoimagery.9 ) If you want to prove to yourself that the multispectral rasters on Terra- server-USA are higher resolution than the panchromatic DOQQs, go back to your view of the state capitol. Zoom in as far as you can on the Aerial data set, and then flip over to the Urban Areas tab. You should have a couple more clicks to zoom in. Did you also notice that once you zoomed into the maximum resolution on the Urban Areas tab, the Aerial tab disappeared? Zoom a couple of clicks out, and the other tab should reappear. So, what’s going on? The mapmakers wanted to make sure that you didn’t exceed the native resolution of the imagery. Downsampling (zooming out) doesn’t pose much risk—if you want to see a lower- resolution snapshot of the imagery, you can easily adjust the GSD with- out affecting the quality of the output. Of course, you’ll see less detail, but then again that’s what you asked for, isn’t it? You are losing detail, but the original image has all of the data necessary to safely show you the data at the newly requested resolution. On the other hand, upsampling the data beyond the native resolution can cause serious output issues. By zooming closer than what the imagery can support, the pixels get blocky and generally icky looking. Your image gets pixelated because you’re asking to see more informa- tion than the image can provide. Both Google Maps and Terraserver-USA optimize performance by pre- downsampling the data to a series of fixed levels. This is called pyra- miding your data set; each time you reduce the resolution but don’t increase the ground space coverage, the total width and height of your image is reduced. At native 1-meter resolution, a DOQQ is 8,000 pixels by 8,000 pixels. If you downsample the image to 2-meter resolution, your image is now 4,000 by 4,000 pixels. If you downsample to 4-meter resolution, your image drops to 2,000 by 2,000 pixels. Hence, you have the pyramid effect. Screen Resolution vs. Print Resolution As if all of this image resizing isn’t complicated enough, there is one more gotcha waiting to getcha. That gotcha shows up once you try to create a “dead-tree” (printed) edition of your raster. Earlier in this section we talked about typical screen resolutions in DPI. My laptop’s native DPI is about 85 but can drop down to 55 based on what the external projector can support. If you’ve looked at your printer specs recently, you know that printers generally start at 300 DPI and can go up to 600 DPI or higher. This means that the physical size of your map can vary greatly between what you can see on your screen and what comes from your printer. Our trusty DOQQ is about 94 inches wide on my screen, or close to 8 feet wide (8,000 pixels at 85 DPI)—that’s a lot of scrolling. However, that same DOQQ printed out at 600 DPI is just more than 13 inches wide. The focus of this book is on digital mapmaking, but it’s nice to know what will happen when your users press Ctrl+P.
Tres herramientas pueden ser usadas para ello Proj, GDAL (Geospatial Data Abstraction Library) y GEOS, en el paquete FWTools (Frank Warmerdam Tools) encontraremos GDAL y Proj. GEOS (Geometry Open Source) permite a las aplicaciones leer y escribir elementos (tales como puntos, línias o polígonos) en un formato WKT. GDAL proporciona unos comandos para reproyectar ficheros raster, pero además contiene un subproyecto (OGR) usado para reproyectar datos vectoriales.
En FWTools viene un comando denominado ogr2ogr, este proporciona una serie de utilidades sobre las capas con datos vectoriales. Haciendo ogr2ogr -h veremos las diferenctes opciones. Una de las utilidades es la de reproyectar una capa, por ejemplo:
ogr2ogr -t_srs EPSG:4269 co-hw.shp highways.shp
Este comando reproyectaría la capa highways.shp en la co-hw.sph (o alrevés
); el argumento -t_srs especifica (Target) Spatial Reference System (SRS), aunque si el fichero .prj está presente utilizaremos -s_srs (Source) SRS. EPSG:4269 corresponde a la proyecciónEuropean Petroleum Survey Group.