top of page
  • trigicchaveropa

Shapefile Repair Tool 1.0: A Must-Have for GIS Professionals



Zoom to the national scale map, choose the year that you want to download and click on the "Download Defined Area of Interest Data" button on the toolbar. Respond "yes" to the download confirmation question. The downloadable file will be a Winzip compressed file containing the CDL in a GeoTIFF (TIF) file format. As an alternative to CropScape, a national CDL mosaic in an Erdas Imagine IMG file format is available for download on the SARS National Download webpage.


To view the Cropland Data Layer data on CropScape with just one or two commodities shown at the national, state, district and/or county levels: 1) Select "Define Area of Interest by State/ASD/County" or "Define Area of Interest" or "Import Area of Interest" from the top toolbar 2) Once you have an area of interest (AOI) defined select the "Area of Interest Statistics" from the top toolbar 3) Choose the commodity of interest from the popup, you can choose one or many 4) Export the selected crop(s) for mapping to create a graphic containing only the selected crop(s) in your defined AOI.




Shapefile Repair Tool 1.0




CropScape currently does not have the capability to create PDF maps with only one specific crop or group of crops shown. However, the user can export the actual CDL data with only a single crop or subset of crops in a Geotiff (TIF) format using the CropScape "Area of Interest Statistics" tool. That downloaded data can then be used to create a more polished PDF map using ESRI ArcGIS software. Below are the procedures:1.Select your area of interest;2.Use the "Area of Interest Statistics" tool to calculate statistics;3.Check the box of the crop type(s) you wish to display in the pop-up statistical result window;4.Click "Export the selected crop(s) for mapping";5.Click the "Download" button to download the resulting image in a Geotiff (TIF) file format;6.Load the downloaded TIF file in ArcGIS where you can then add additional data, such as boundaries and/or legends, to create your own map that can then be exported to a PDF file.


We do not offer the data in a vector format, such as shapefile. The Cropscape/CDL data can be downloaded in a raster-based GeoTIFF file format and used in most common GIS software. In ESRI ArcGIS you would most likely require the 'Spatial Analyst' extension to perform any in-depth GIS applications using the GeoTIFF file. And any common image processing software, such Erdas Imagine, ENVI or PCI, should be able to perform basic image processing/GIS applications using the GeoTIFF file. This type of pixel-based data does not lend itself to being converted to vector since the resulting polygon file would be enormous. Depending on the size of area you are studying it is technically possible to convert Cropscape data to a shapefile, but it would have to be a rather small area such as a single county or smaller. If you do convert the data to a shapefile format and want to add the CropScape/CDL category names in ESRI ArcGIS, then start by downloading this spreadsheet file cdl_codes_names.xlsx that lists all CDL codes and category names. Open this file and change the "Code" column header to match the name of the attribute field in your newly created shapefile. Then open both the excel file and the shapefile in ArcGIS. Right click on the shapefile in the ArcGIS Table of Contents and do a JOIN on the commonly named "code" attribute field. You can then right click on the shapefile and use Data > Export Data to save a new shapefile with the category names added.


A user can summarize the area of a certain crop within a certain radius using the CropScape online tools. This can be done at the state, county level, agricultural statistics district (ASD), or region. It is also possible to define your own Area of Interest (AOI) either by using the drawing tools or importing your own shapefile. Note that the recommended projection for your imported AOI data is Albers Equal Area Conic Projection (EPS:5070). Here are the basic steps: 1. define an Area of Interest (AOI) - you can do this by state/ASD/county or use the drawing tools to create your own AOI or the Import Area of Interest to use your own shapefile 2. after defining your AOI - click on the 'Area of Interest Statistics' button on the toolbar at the top of the page 3. this brings up an acreage and pixel count summary table 4. if you would like to download a graphic of the area for a single crop or group of crops then you can place a checkmark next to the crop(s) you are interested in 5. click on the 'Export selected crop(s) for mapping' button 6. then click the 'Download' button and specify where to save the file Users should be aware of the potential limitations of acreage summaries that are based on only pixel counting. Most land cover classification datasets will contain some level of counting bias (typically downward). Pixel counting is usually downward biased when compared to the official estimates. Counting pixels and multiplying by the area of each pixel will result in biased area estimates and should be considered raw numbers needing bias correction. Official crop acreage estimates at the state and county level are available at QuickStats. Here are a list of references discussing the subject matter of pixel counting and estimation: a) Gallego F.J., 2004, Remote sensing and land cover area estimation. International Journal of Remote Sensing. Vol. 25, n. 15, pp. 3019-3047. b) European Commission, Joint Research Centre, MARS; Best practices for crop area estimation with Remote Sensing - Section 4.1.1. c) Czaplewski, R. L. (1992). Misclassification bias in areal estimates. Photogrammetric Engineering and Remote Sensing, 58, 189-192.


The Agricultural Statistics Districts (ASD) for the entire U.S. are available in ESRI shapefile format ASD shapefile. An ASD is defined as a contiguous group of counties having relatively similar agricultural characteristics. The ASD's used by NASS usually divide each state into as many as nine Agricultural Statistics Districts to make data comparison easier. Each district is more homogeneous with respect to agriculture than the state as a whole. The following link provides national State, ASD, and county codes in tabular .csv format asds2009.csv. Lists of state, ASD, and county can also be found at the following link: county_list.txt.


  • ArcGIS Online: Add layers from files

  • ArcGIS Online: Add items

  • ArcGIS Business Analyst: Import File

  • ArcMap: What is a shapefile?

  • ArcMap: Shapefile file extensions

  • ArcMap: Repair Geometry

  • Community Analyst: Import file

  • Error: Failed to add data, unsupported data type. .shp



I have inherited a project where part of the workflow is the execution of numerous FME Workbench files. It has worked flawlessly for several hundred runs, but it gets tripped up on a very large shapefile(actual shp is 1586981264 bytes, dbf is 51949349 bytesType: PolygonNumber of Shapes: 775361 ).


In ArcMap load the large shapefile and convert this into a file-geodatabase.Why? The structure of the file geodatabase has been created by ESRI not by choice but because they had to - larger and larger files impacted on the shapefile (2GB limit at the time) and also the access/personal geodatabase (.mdb) has poor stability at nearly capacity (2GB).


So moving to the shapefile to the File Geodatabase should see the (ArcObjects) reader in FME have no issues reading the geometry. Yes is more work to include the File Geodatabase into FME. But a time-saver when you think of how much time you have already used in trying to convert the shapefile directly.


Try using the Grass tool v.clean from the processing toolbox to repair the geometries. This will create a total of 175 features so afterwards, run Collect geometries on the cleaned output and use 'DistrictNu' in the parameters as the unique ID field.


Firstly, after you run the Check validity processing tool, the output layers are very helpful. The Error output point layer shows you the locations of the found errors. The attribute table also tells you the type of error for each point so if you view it on top of the Invalid output layer, you can zoom in and inspect the errors the tool has found (example below).


In this case, several features with invalid geometries are identified in the eastern districts region- the results appear very similar to those obtained with the Check Validity tool, but setting different rules can yield different results, so it can be worth experimenting.


As for the problematic south-western district, I'm not sure why it is not identified as invalid by either Check validity or Topology checker, but another method is simply to use the vertex tool. If you put the layer in edit mode, you can activate the vertex tool on the current layer or all layers.


Another tip which sometimes comes in handy for fixing geometry problems is to use one of the buffer processing tools and apply either a 0 distance buffer or a very small positive or negative buffer. I tried this on the original Supervisor_Districts shapefile and found that it did not fix the south west feature, but after manually repairing that one, a very small negative buffer seemed to work quite well on the other invalid features.


The ogr2ogr command line tool is an easy way to filter, reproject and trim columns in a shapefile. The workflow below shows how we can approximate the following ogr2ogr command with the OGR api using a decently large parcel shapefile from King County GIS .


If you need shapefiles for your GIS applications or processes, look no further. Geofabrik produces shapefiles of all kinds. A number of simple shapefiles are available for free on our download serverat


For our customers we have a shapefile export that is decidedly richer in features and where we have already straightened out many of the idiosyncracies and fixed some of the errors that sometimes make processing OpenStreetMap data difficult.


These extended shapefiles are laid out according to our standard, "OpenStreetMap Data in Layered GIS Format", whichwe update continuously. Here are two example shapefiles for you to download (the files contain all layers, not onlythose depicted): 2ff7e9595c


0 views0 comments

Recent Posts

See All

Assista a canais de TV árabes com o altaneen 3 plus apk

Soundwave 3 Plus Mod APK: melhore sua experiência de ouvir música Se você é um amante da música que deseja desfrutar de uma melhor qualidade de som e mais controle sobre suas configurações de áudio, v

Baixe o happy chick

Como baixar o emulador Happy Chick e jogar milhares de jogos no seu dispositivo Se você é fã de videogames, já deve ter ouvido falar do Happy Chick Emulator. É uma plataforma que oferece vários tipos

bottom of page