Нефть и песок О стали Компрессор - подбор и ошибки Из истории стандартизации резьб Соперник ксерокса - гектограф Новые технологии производства стали Экспорт проволоки из России Прогрессивная технологическая оснастка Цитадель сварки с полувековой историей Упрочнение пружин Способы обогрева Назначение, структура, характеристики анализаторов Промышленные пылесосы Штампованные гайки из пружинной стали Консервация САУ Стандарты и качество Технология производства Водород Выбор материала для крепежных деталей Токарный резец в миниатюре Производство проволоки Адгезия резины к металлокорду Электролитическое фосфатирование проволоки Восстановление корпусных деталей двигателей Новая бескислотная технология производства проката Синие кристаллы Автоклав Нормирование шумов связи Газосварочный аппарат для тугоплавких припоев
Главная --> Промиздат -->  Map principle 

1 2 3 4 5 6 7 8 9 10 11 ( 12 ) 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

The command line will reproject the coordinate pairs stored in file spearfishUTM NAD2 7.txt to coordinates in Lambert Azimuthal Equal Area on a Sphere without geodetic datum and write the result to file

spearfishLAEA.txt:


3.3.2 Map layers

The projection of raster, vector and site map layers between two different coordinate systems requires two LOCATIONs: one LOCATION holding the source map layer and input coordinate system information, and another LOCATION for reading the target coordinate system information and storing the projected map layer.

We will illustrate the procedure using the following example. All maps such as the elevation raster map of the Spearfish region is available in UTM/NAD27 coordinate system (in the sample spearfish LOCATION, PERMANENT MAPSET). We want to transform this map into the spearfishNAD83 LOCATION we have defined in Section 3.2.2. We now start GRASS with the spearfishNAD83 LOCATION and pull the elevation map layer from the source LOCATION spearfish into our current LOCATION as follows:


After some computation time, the source map is available projected in the current LOCATION and MAPSET. Per default, the resulting map is saved with same name. Note that the resolution and region (map extent) of the projected map layer depends on the current region settings in the target LOCATION spearfishNAD83, you can verify the settings with g.region -p. Like that you can also limit transformations to subregions with desired resolution. Please refer to the manual page of r.proj for the interpolation methods used during the transformation.

Similarly, you can project the vector and site map layers:


For the vector data, the entire map is always projected, because creation of sub-regions is not supported. Again, keep in mind that the included datum transfor-



The following example shows how to convert a free LANDSAT-TM7 scene for the Spearfish region, as available from GLCF Maryland9, from WGS84 to NAD27 to match the Spearfish LOCATION projection:

gdalinfo p033r02 9 7t20000712 zl3 nnl0.tif

#EPSG codes available in /usr/local/share/proj/epsg #

#Reprojection from UTM/WGS84 to UTM/NAD27/Clar]te66 # (use -tr xres yres to maintain original resolution): gdalwarp -t srs +init=epsg:26713 -tr 28.5 28.5 \ p033r029 7t20000712 zl3 nnl0.tif \ p033r029 7t20000712 zl3 nnl0 NAD27.tif

#Cut out region of interest:

# boundary coordinates W N E S

gdal translate -projwin 589980 4928010 609000 4913700 \ p033r029 7t20000712 zl3 nnl0 NAD27.tif \ p033r029 7t20000712 zl3 nnl0 NAD27 small.tif

♦Verification:

gdalinfo p033r029 7t20000712 zl3 nnlO NAD27 small.tif

The preprocessed LANDSAT-7 band is ready now for import into the Spearfish LOCATION with r.in.gdal. You can also download the prepared data set from the book related Web page.10

mations (here from NAD27 to NAD83) are only supported from GRASS 5.3 onwards.

3.3.3 Reprojecting with GDAL/OGR tools

Map reprojection and spatial subsetting of GIS data sets is also possible outside of GRASS. Sometimes it is more convenient to reproject maps to a desired projection (or coordinate system, ellipsoid, geodetic datum) before importing

it into a GRASS LOCATION. The free GDAL/OGR libraries8 provide a set of tools to perform such map preprocessing. GDAL is the raster data engine, while OGR supports vector data.

GDAL and raster data. GDAL is a translator library for raster geospatial data formats. Several tools are provided, we introduce some of them here. The general command structure is:

gdalinfo -formats gdalinfo [flags] rastmap

gdal translate [flags] [parameters] inrastmap outrastmap gdalwarp [flags] [parameters] inrastmap outrastmap



OGR and vector data. Vector maps can be reprojected and preprocessed using the OGR library, with the SHAPE format as default output. We use the program ogrinfo to report vector map metadata and ogr2ogr to perform map reprojections. The general command structure is:


In our OGR example we use the geological map from the National Atlas of the U.S. The map is provided in SHAPE format. We prepare it here for import into the Spearfish LOCATION which requires reprojection and spatial subsetting:


Now the SHAPE file contains the projection information. Next we reproject to UTM/NAD27/aarke66 as required for the Spearfish LOCATION and cut out the region of interest. For convenience we use the EPSG code to select the output projection parameters. Note, that it is necessary to have the NAD datum shift files installed (see the PROJ4 web page, section Frequently Asked Questions for details):

#EPSG codes available in /usr/local/share/proj/epsg #

#Reprojection from LatLong/Sphere to UTM/NAD27/Clarke66 #

#Cut out region of interest (boundary coords. W S E N): ogr2ogr -t srs +init=epsg:26713 +nadgrids=ntvl can.dat \

-spat -103.87111 44.37293 -103.62943 44.50174 \

geolgyp UTM NAD27 small.shp \

geolgyp LL sphere.shp

#Verification:

ogrinfo -summary geolgyp UTM NAD27 small. shp \ geolgyp UTM NAD27 small

The resulting SHAPE map can be imported into the Spearfish LOCATION.



1 2 3 4 5 6 7 8 9 10 11 ( 12 ) 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127