![]() And we all see the names and types of all of the columns of data in the shapefile. We learn that the projection is "USA_Contiguous_Albers_Equal_Area_Conic". We also learn the extent of the shapefile, though the extent is reported in projected coordinates. We learned that this is a shapefile with a single layer name US_county_1890, that it contains polygons, that there are 2799 features. Notice several important pieces of information. ![]() PROJCS["USA_Contiguous_Albers_Equal_Area_Conic", ![]() The resulting output looks like this: INFO: Open of `US_county_1890.shp' The following command will inspect our shapefile: ogrinfo -so -al US_county_1890.shp You can use ogrinfo to inspect a shapefile (or other vector format). cd ~/dev/spatial-workshop/data/nhgis0040_shape On my computer that looks like this, though your file will be saved somewhere different. ![]() (You may wish to read these quick introductions to the command line: “ The ProfHacker Guide to the Command Line” and “ Getting Comfortable on the Command Line.”) You will then have to navigate to the directory with the shapefile using the cd (change directory) command. After downloading that file from NHGIS or the resources page, you will want to open your terminal. For these examples, we will use the same shapefile ( US_county_1890.shp) that we used in the QGIS lesson. Below are a handful of the most useful commands using GDAL/OGR. But it can be more reliable to use the command line GDAL/OGR set of tools to manipulate spatial data. QGIS will also let you save files in a different format (e.g., saving a shapefile as GeoJSON) and reproject data. We have already seen how to inspect data in QGIS by looking at the attribute tables. Putting longitude first, the coordinates for São Paulo would be represented as -46.6333, -23.5500. Instead, north latitudes and east longitudes are represented as positive numbers, and south latitudes and west longitudes are represented as negative numbers. Latitudes and longitudes are not stored with the notation N or S, E or W. However it is always better to represent latitude and longitude in decimal degrees: 23.5500° S, 46.6333° W. For instance, the latitude and longitude of São Paulo, Brazile could be represented as 23° 33' 0" S, 46° 37' 59.8794" W. Latitude and longitude are sometimes represented in sexagesimal (base 60) notation. In a spatial system longitude is the \(x\) coordinate and latitude is the \(y\) coordinate, so some CRSes will list points in longitude, latitude format. The details of the many coordinate reference systems are not important, but one should keep in mind that data may not be in the desired CRS, and know how to convert it (see below).Īn important point to keep in mind: We typically refer to “latitude and longitude.” However, in a Cartesian coordinate system the \(x\) coordinate is usually listed before the \(y\) coordinate. Some spatial information, for instance, is described in the distance in meters from a certain point on the earth others contain projected coordinates. Longitude and latitude is not the only way to represent points, however. This system is codified in the WGS84 standard, otherwise known by the code EPSG:4326. Latitude and longitude represents the Earth as a sphere, with a 0° of longitude that runs through Greenwich, England, and a 0° latitude that is at the earth’s equator. The most common of these is latitude and longitude. Geospatial information is kept in terms of a coordinate reference system (CRS), an agreed-upon way of representing points on the earth. See common spatial data formats below for more information. ![]() For example, other than the raster file mentioned above, all of the data in the Natural Earth quick start kit is vector data. You are more likely to work with vector data. In the Natural Earth quick start kit, the file NE1_50M_SR_W/NE1_50M_SR_W.tif contains terrain data for the earth. See inspecting spatial data to learn how to determine if an image has spatial information embedded. Sometimes the resulting files have a different file extension, such as. The resulting files can then be loaded into a GIS program. But through a process called georectification, it is possible to embed spatial information within a file. 1 Map images may not be associated with spatial data. tiff files, or possible in the form of terrain data. You are most likely to encounter raster data in the form of map images, such as. Image by Michael Howser from University of Connecticut Libraries. Raster data on the left vector data on the right. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |