vectorStats is an executable that can pull out the basic statistics from the attributes, geometry, and intersections with user defined vector dataset.
./vectorStats <inputVectorPath>
which will collect the basic stats and print them to the console
To output the results to a csv file instead of reporting to console:
./vectorStats <inputVectorPath> -csv=output.csv
To intersect the geometries with a user provided vector dataset and report how many records fall within each feature:
./vectorStats <inputVectorPath> -intersection=world_borders.shp
This will take report how many geometries in the input vector intesect each of the geometries stored in the intersection dataset.
After calculating the basic statistics and intersections with your designated areas of interest, you would get output to a file or the console looking something like this:
name,type,sum,min,max,mean,stdDev, MONTH,Integer,1320.000000,11.000000,11.000000,11.000000,0.000000, YEAR,Integer,241680.000000,2014.000000,2014.000000,2014.000000,0.000000, GSD,Real,110.480000,0.830000,1.060000,0.920667,0.057529, SQKM,Integer,19770.000000,86.000000,227.000000,164.750000,38.660326, RANKING,Integer,669894.000000,5547.000000,5652.000000,5582.450000,43.484260, ELEV_ANGLE,Real,8118.595220,56.634483,82.445810,67.654960,7.045906, AZIM_ANGLE,Real,23973.240976,5.513851,358.222600,199.777008,119.440255, CLOUDS,Integer,3911.000000,0.000000,100.000000,32.591667,43.745380, SUN_ELEV,Real,5294.415688,21.800274,68.581230,44.120131,16.627029, SUN_ANGLE,Real,18105.566500,100.167930,172.393050,150.879721,22.236138, UL_LAT,Real,2606.783290,-17.093300,49.006400,21.723194,21.846796, UL_LON,Real,-3290.549400,-121.855000,112.132000,-27.421245,84.172002, UR_LAT,Real,2606.821590,-17.081900,49.011300,21.723513,21.847333, UR_LON,Real,-3274.408900,-121.699000,112.261000,-27.286741,84.164194, LL_LAT,Real,2592.703120,-17.178800,48.851600,21.605859,21.842905, LL_LON,Real,-3290.536200,-121.855000,112.132000,-27.421135,84.171909, LR_LAT,Real,2592.725550,-17.168900,48.856000,21.606046,21.843397, LR_LON,Real,-3274.409500,-121.699000,112.262000,-27.286746,84.164306, GEORECTIFY,Integer,120.000000,1.000000,1.000000,1.000000,0.000000, name,type,uniqueValues,mostCommon,percent,leastCommon,percent, IMAGE_ID,String,120,20141118075021200000116131242000122814800THC,0.833333,20141118075021200000116131242000122814800THC,0.833333, ORDER_ID,String,46,2014111815524320000011612158,7.5,2014111807502120000011613124,0.833333, SOURCE_ABR,String,1,IK-2,100,IK-2,100, SOURCE,String,1,IKONOS-2,100,IKONOS-2,100, SENS_MODE,String,1,PAN/MSI,100,PAN/MSI,100, STRIP_ID,String,46,2014111815524320000011612158,7.5,2014111807502120000011613124,0.833333, SCENE_ID,String,120,2000122814800THC,0.833333,2000122814800THC,0.833333, COLL_DATE,Date,2,2014/11/18,75,2014/11/19,25, SPATIALREF,String,1,EPSG:4326,100,EPSG:4326,100, STEREO_ID,String,1,,100,,100, DATA_OWNER,String,1,DigitalGlobe,100,DigitalGlobe,100, IMAGE_URL,String,120,http://geofuse.geoeye.com/static/browse/ikonos/2/kpms/2014/11/2014111807502120000011613124_0.jpg,0.833333,http://geofuse.geoeye.com/static/browse/ikonos/2/kpms/2014/11/2014111807502120000011613124_0.jpg,0.833333, WORLD_URL,String,120,http://geofuse.geoeye.com/static/browse/ikonos/2/kpms/2014/11/2014111807502120000011613124_0.jgw,0.833333,http://geofuse.geoeye.com/static/browse/ikonos/2/kpms/2014/11/2014111807502120000011613124_0.jgw,0.833333, METADATA,String,120,http://geofuse.geoeye.com/landing/image-details/Default.aspx?id=20141118075021200000116131242000122814800THC,0.833333,http://geofuse.geoeye.com/landing/image-details/Default.aspx?id=20141118075021200000116131242000122814800THC,0.833333, PRODUCT,String,1,http://www.digitalglobe.com/products/data,100,http://www.digitalglobe.com/products/data,100, LatLong,String,32,41,-75,7.5,-13,-38,0.833333, Intersections with : Bolivia,8, Brazil,23, China,30, Congo,1, Ethiopia,1, Panama,4, United States,53,
You can see that there are three distinct sections which represent Numeric, String, and Intersection statistics. Note that Dates are treated as strings. Additionally, the centroid of each geometry is cast as a string called LatLong, and the statistics are calculated for most and least common location collected in the archive.
Copyright 2014 Google Inc. All rights reserved.