This file contains 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
\documentclass[10pt]{article} | |
\usepackage{labels} | |
\usepackage{url} | |
\newcommand{\brk}{$\cdot$ } | |
%\LabelGridtrue % Enable this to | |
\LabelCols=2% Number of columns of labels per page | |
\LabelRows=6% Number of rows of labels per page | |
\begin{document} | |
\numberoflabels=12 |
This file contains 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
Based on [this](http://stackoverflow.com/questions/27905295/how-to-replace-nans-by-preceding-values-in-pandas-dataframe) | |
ee['company']=ee['company'].fillna(method='ffill') |
This file contains 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
import rasterio | |
from numpy import copy, random, arange | |
import numpy as np | |
from matplotlib import pyplot | |
from matplotlib.colors import LinearSegmentedColormap | |
#Reading | |
dataset = rasterio.open('raster.tif') | |
#example raster is from https://daac.ornl.gov/VEGETATION/guides/Decadal_LULC_India.html | |
data=dataset.read(1) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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
import rasterio.merge | |
bounds=None | |
res=None | |
nodata=None | |
precision=7 | |
def merge(input1,bounds, res, nodata, precision): | |
import warnings | |
warnings.warn("Deprecated; Use rasterio.merge instead", DeprecationWarning) |
This file contains 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
from shapely import geometry | |
ll=(84.945856,23.475927) | |
ue=(86.505248, 23.871591) | |
p1 = geometry.Point(ll[0],ll[1]) | |
p2 = geometry.Point(ue[0],ll[1]) | |
p3 = geometry.Point(ue[0],ue[1]) | |
p4 = geometry.Point(ll[0],ue[1]) |
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 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
import pandas as pd | |
from shapely.geometry import Point, shape | |
from geopandas import GeoDataFrame | |
import fiona | |
from collections import OrderedDict | |
# a test to create shape file | |
df=pd.read_csv('VNP14IMGTDL_NRT_South_Asia_24h.csv') | |
geometry = [Point(xy) for xy in zip(df.longitude, df.latitude)] | |
df = GeoDataFrame(df, geometry=geometry) |
This file contains 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
from pykml import parser | |
import pandas as pd | |
filename='ref1.kml' | |
with open(filename) as f: | |
folder = parser.parse(f).getroot().Document.Folder | |
plnm=[] | |
cordi=[] | |
for pm in folder.Placemark: |
OlderNewer