Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Functions for use with GeoJSONs */ | |
/* | |
Pass data like so: var newGeoJson = sumFields(inputFC, inputFields, outputField) | |
Input FC can be a point, line, polygon. Use the variable name assigned to the GeoJSON, not the L.geoJson variable | |
inputFields can be a single field or an array of fields, formatted like so: [value1, value2, ..., valueN] | |
outputField is the name of the output field | |
*/ | |
/* Sum Fields | |
These two functions are used to sum multiple columns of data from one GeoJSON together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file = open("minify1.txt", "w") | |
with open('test.txt') as f: | |
for line in f: | |
newTxt = line.rstrip('\r\n').replace(" ","") | |
file.write(newTxt) | |
if 'str' in line: | |
break | |
file.close() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# NumPy Raster Calculator | |
# ----------------------- | |
# Purpose: The purpose of this Python script is to use ArcGIS's arcpy package along with the Python library numpy to convert Landsat thermal bands from digital numbers to Top of Atmosphere (ToA) brightness-temperature values that provide pixel temperature in degrees Celsius. | |
# Purpose #2: The second purpose is that it allows some work to be done on rasters without the need for the Spatial Analyst extension | |
# | |
# Requirements: ESRI ArcGIS arcpy; Python 2.7.x; numpy; Landsat data | |
# ArcPy takes care of the dirty work of conversions and geospatial stuff and I have ArcGIS installed, hence it's use. | |
######################### |