There are two ways to remove twitter headers and footer from the widget:
Method 1: Add data-chrome attribute to anchor tag
<a class="twitter-timeline" href="https://twitter.com/TWITTER_ID" data-widget-id="YOUR_WIDGET_ID" data-chrome="nofooter noborders transparent">Tweets by @TWITTER_ID </a>
Method 2: Using CSS
.timeline-header, .timeline-footer
{
display:none ;
}
More customization on Embedded timelines : Customization Options
Monday, April 20, 2015
Wednesday, April 15, 2015
Conference: FOSS4G Seoul 2015, FOSS4G First Time in Asia
The annual FOSS4G conference is the largest global gathering focused on open source geospatial solution. FOSS4G brings together developers, users, decision-makers and businessmen from a broad spectrum of organizations and fields of operation. Through six days of workshops, presentations, discussions and code sprint, FOSS4G participants create effective and relevant geospatial products, standards, human networks and business opportunities.
FOSS4G Seoul team is very pleased to announce that FOSS4G Seoul conference is now open for registration. http://2015.foss4g.org/attending/registration/ This year’s International FOSS4G will be held in The-K Hotel, Seoul, 14-19 September, for the first time in Asia.
FOSS4G Seoul team is very pleased to announce that FOSS4G Seoul conference is now open for registration. http://2015.foss4g.org/attending/registration/ This year’s International FOSS4G will be held in The-K Hotel, Seoul, 14-19 September, for the first time in Asia.
Thursday, April 9, 2015
How to update R to a new version?
Updating R to a new version can be difficult so, I thought that R users out there would find these R version management and configuration approaches useful. There is an R package “installr” that allows one, at the command line, to check the current R version and optionally: 1) download the new version, 2) launch the install, 3) move installed libraries to the new R install, 4) update libraries and 5) uninstall the previous R version. I also attached an “Rprofile.site” R GUI configuration file that will set the path for the R library and changes some other settings.
Following is the code that will install and require the “installr” package and run the “updateR” function with the appropriate flags. To run in Windows, right click the R icon and select "Run as administrator". This script will automatically: 1) check and download the current version of R, 2) execute the install, 3) move current packages to new install, 4) delete old packages, 5) update packages. Copy and paste the following highlighted code block and then answer the queries at the R commandline.
# set a CRAN mirror and library path
.Library.site <- file.path(chartr("\\", "/", R.home()), "library")
.libPaths(file.path(chartr("\\", "/", R.home()), "library"))
local({r <- getOption("repos")
r["CRAN"] <- "http://cran.stat.ucla.edu/"
options(repos=r)})
# If not installed, adds installr library and runs updateR function
if(!require(installr)) {
install.packages("installr", repos = "http://cran.us.r-project.org")
require(installr)
}
updateR(install_R = TRUE, copy_packages = TRUE, keep_old_packages = FALSE,
update_packages = TRUE, quit_R = FALSE, keep_install_file = FALSE)
In the R install wizard choose:
Go with install defaults until...
Under "select components", uncheck 32-bit core files NEXT>
Under "startup options" select: Yes (customize startup) NEXT>
Under "Display Mode" select: SDI (separate windows) NEXT>
Then go with defaults.
You can then uninstall the previous R version(s), with this command, by choosing the previous version in the popup-box, or just specifying the version.
uninstall.R() for interactive window or uninstall.R("3.1.2") to uninstall a specific version.
The “Rprofile.site” R GUI configuration file configures the R GUI:
1) sets the default library path, so that it does not default to your windows users directory (as long as packages are installed with R running as administrator);
2) sets a few options so numbers are never displayed as scientific notation and strings are not automatically coerced into factors and;
3) adds two useful functions “ls.functions” and “unfactor”. The “ls.functions” will list all the functions, associated with the specified package, in the R namespace and the “unfactor” function will coerce factors in a data.frame into a character class.
#### example to list all available functions in the MASS package ####
require(MASS)
ls.functions(MASS)
#### coerce factor to character ####
( x <- data.frame( y=as.factor(c("1","3","5")),
x=as.factor(c("yes","no","perhaps"))) )
str(x)
# Coerce single column
class(unfactor(x)$y)
# Coerce entire data.frame
x <- unfactor(x)
str(x)
Tuesday, April 7, 2015
Landsat Band combinations for highlighting Earth features
Following are the band combinations for highlighting earth features for Landsat Images.
Agriculture: Highlights agriculture in bright green. Bands 6,5,2
Natural Color: Sharpened with 25m panchromatic band. Bands 4,3,2+8
Color Infrared: Healthy vegetation is bright red. Bands 5,4,3
SWIR (Short Wave Infrared): Highlights rock formations. Bands 7,6,4
Geology: Highlights geologic features. Bands 7,4,2
Bathymetric: Highlights underwater features. Bands 4,3,1
Panchromatic: Panchromatic image at 15m. Band 8
Vegetation Index: Normalized Difference Vegetation Index (NDVI). (Band5-Band4)/(Band5+Band4)
Moisture Index: Normalized Difference Moisture Index (NDMI). (Band5-Band6)/(Band5+Band6)
Further Details: Identifying land use and land cover(LULC) features using band rationing technique
Agriculture: Highlights agriculture in bright green. Bands 6,5,2
Natural Color: Sharpened with 25m panchromatic band. Bands 4,3,2+8
Color Infrared: Healthy vegetation is bright red. Bands 5,4,3
SWIR (Short Wave Infrared): Highlights rock formations. Bands 7,6,4
Geology: Highlights geologic features. Bands 7,4,2
Bathymetric: Highlights underwater features. Bands 4,3,1
Panchromatic: Panchromatic image at 15m. Band 8
Vegetation Index: Normalized Difference Vegetation Index (NDVI). (Band5-Band4)/(Band5+Band4)
Moisture Index: Normalized Difference Moisture Index (NDMI). (Band5-Band6)/(Band5+Band6)
Further Details: Identifying land use and land cover(LULC) features using band rationing technique
Tuesday, March 10, 2015
ArcMap tool for Panning and Zooming while editing using C#
Draw features in ArcMap using ArcGIS Addin tool (Arcobject's IRubberband Interface) doesn't provide ways to zoom and pan while editing. In order to implement pan and zoom functionality during edit use IDisplayFeedback Interface. Following is the code snippets using IDisplayFeedback Interface using C#. Then, you can use ArcMap standard keys to pan (arrows-left, right, top, bottom) and zoom (mouse-scroll or Z & X).
protected override void OnUpdate()
{
Enabled = ArcMap.Application != null;
}
protected override void OnMouseDown(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
{
DrawGeometryOnMousedown(ArcMap.Document, arg);
}
protected override void OnMouseMove(MouseEventArgs arg)
{
DrawGeometryOnMouseMove(ArcMap.Document, arg);
}
protected override void OnDoubleClick()
{
FinishGeometryDrawOnDblClick(ArcMap.Document);
}
protected override void OnRefresh(int hDC)
{
if (newPolygonFeedback != null)
{
newPolygonFeedback.Refresh(hDC);
}
}
#region private helpers
//Polygon geometry object
private INewPolygonFeedback newPolygonFeedback;
private void DrawGeometryOnMousedown(IMxDocument doc, ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
{
// Get the ScreenDisplay for the the ActiveView
IDisplay display = doc.ActiveView.ScreenDisplay;
// Get the current mouse location in Map Units
IPoint point = display.DisplayTransformation.ToMapPoint(arg.X, arg.Y);
// Check that user is not using an existing feedback
if ((newPolygonFeedback == null))
{
// Create a new Feedback
newPolygonFeedback = new NewPolygonFeedback();
// Get the Feedback's Symbol by reference (IDisplayFeedback::Symbol)
var simpleLineSymbol = newPolygonFeedback.Symbol as ISimpleLineSymbol;
// Create a new RGBColor and set it up
IRgbColor rgbColor = new RgbColor();
rgbColor.Green = 255;
rgbColor.Red = 0;
rgbColor.Blue = 255;
// Set the Color and Style for the Feedback's Symbol
if (simpleLineSymbol != null)
{
simpleLineSymbol.Color = rgbColor;
simpleLineSymbol.Style = esriSimpleLineStyle.esriSLSSolid;
}
// Set the new Feedback's DISPLAY property (IDisplayFeedback::DISPLAY)
newPolygonFeedback.Display = (IScreenDisplay)display;
// Start the Feedback at the current mouse location
newPolygonFeedback.Start(point);
}
else
{
// Otherwise use the current mouse location to add a vertex to the current feedback
newPolygonFeedback.AddPoint(point);
}
}
private void DrawGeometryOnMouseMove(IMxDocument doc, ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
{
// Get the ScreenDisplay for the the ActiveView
IMxDocument pMXDoc = doc;
IDisplay pDisp = pMXDoc.ActiveView.ScreenDisplay;
// Check if the user is currently using the feedback
if (newPolygonFeedback != null)
{
// Get the current mouse location in map units
IPoint pPnt = pDisp.DisplayTransformation.ToMapPoint(arg.X, arg.Y);
// Move the Feedback to the current mouse location (IDisplayFeedback::MoveTo)
newPolygonFeedback.MoveTo(pPnt);
}
}
private void FinishGeometryDrawOnDblClick(IMxDocument doc)
{
// Check if the user is currently using the feedback
if (newPolygonFeedback != null)
{
// Stop the feedback and set it to Nothing
IGeometry geometry = newPolygonFeedback.Stop();
newPolygonFeedback = null;
//check for valid geometery
if (geometry != null)
{
IScreenDisplay screenDisplay = doc.ActiveView.ScreenDisplay;
// Constants
screenDisplay.StartDrawing(screenDisplay.hDC, (System.Int16)esriScreenCache.esriNoScreenCache);
// Explicit Cast
IRgbColor rgbColor = new RgbColorClass();
rgbColor.Red = 255;
rgbColor.Transparency = 75;
IColor color = rgbColor; // Implicit Cast
ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();
simpleFillSymbol.Color = color;
//Draw geometry
ISymbol symbol = simpleFillSymbol as ISymbol; // Dynamic Cast
screenDisplay.SetSymbol(symbol);
screenDisplay.DrawPolygon(geometry);
screenDisplay.FinishDrawing();
}
}
ArcMap.Document.ActiveView.Refresh();
}
#endregion private helpers
Draw features in ArcMap using ArcGIS Addin tool (Arcobject's IRubberband Interface)
protected override void OnMouseDown(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
{
//create geometery
if (ArcMap.Document != null)
{
IScreenDisplay screenDisplay = ArcMap.Document.ActiveView.ScreenDisplay;
// Constants
screenDisplay.StartDrawing(screenDisplay.hDC, (System.Int16)esriScreenCache.esriNoScreenCache);
// Explicit Cast
IRgbColor rgbColor = new RgbColorClass();
rgbColor.Red = 255;
rgbColor.Transparency = 75;
IColor color = rgbColor; // Implicit Cast
ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();
simpleFillSymbol.Color = color;
//Draw geometry
ISymbol symbol = simpleFillSymbol as ISymbol; // Dynamic Cast
IRubberBand rubberBand = new RubberPolygonClass();
IGeometry geometry = rubberBand.TrackNew(screenDisplay, symbol);
//check for valid geometery
if (geometry != null)
{
screenDisplay.SetSymbol(symbol);
screenDisplay.DrawPolygon(geometry);
screenDisplay.FinishDrawing();
//Open addattributes wpf form
AddAtrributesView addAtrributesView = new AddAtrributesView(geometry);
addAtrributesView.ShowInTaskbar = false;
addAtrributesView.ShowDialog();
ArcMap.Document.ActivatedView.Refresh();
}
}
}
Wednesday, February 25, 2015
Conference : Unmanned Aircraft Systems Technical Demonstration and Symposium 2015
The second annual technical UAS symposium sponsored by the American Society for Photogrammetry and Remote Sensing (ASPRS) is scheduled for September 29-30, 2015 in Reno, Nevada. Expanding on the highly successful format and events of last year’s symposium this year’s event will include test flights, UAS data processing, and workshops.
Technical Demonstration and Symposium for Unmanned Aircraft Systems hosted by the American Society for Photogrammetry and Remote Sensing
Call for
Speakers and Call for Workshops has also been announced! Details: http://uasreno.org/
Purpose: To assemble UAS developers and researchers, along with geospatial service providers and users of geospatial map data, to share information, showcase new technologies and demonstrate UAS systems in action (in flight).
Mission: To advance knowledge and improve the understanding of UAS technologies and their safe and efficient introduction into our national airspace, government programs and business.
30 cm imagery from Digital Globe
As the global leader in satellite imagery, DigitalGlobe is proud to once again push the boundaries of innovation by being the first company to delivery 30 cm resolution imagery.
This 5x improvement in resolution represents the definition of very-high resolution imagery.
30 cm imagery delivers clearer, richer images that empower better decision making through improved situational awareness. - See more at: Digital Globe 30 cm resolution imagery
This 5x improvement in resolution represents the definition of very-high resolution imagery.
30 cm imagery delivers clearer, richer images that empower better decision making through improved situational awareness. - See more at: Digital Globe 30 cm resolution imagery
Monday, February 2, 2015
Getting into ESRI ArcGIS Add-in Development in .Net and ArcObjects
Recently, I landed into a project for ArcGIS/ArcMap Desktop add-in development using ArcObjects in C#. I am a newbie in both ArcObjects and add-in development. Googling through I got tons of snippets on the ArcMap add-in development, but I was not familiar with tailoring them to make a working application.
Then, I started to look after Youtube and Amazon to see if any good basic books or tutorials that gives me basic concepts on tailoring the ArcObjects/.Net snippets. On youtube, I came across a video tutorials series on “.Net programming with ArcOjects”, an excellent tutorial on ArcObjects and .Net development with sample Gis data and codes to download by Hussein Nasser. I watched all 15 episodes on add-in development using VB.Net.
From the Amazon, I bought a book entitled, “Beginning ArcGIS for Desktop Development using .NET ” by Pouria Amirian, with a blind believe on the reviewers, but it turned out the
The book is wonderful! The author does an excellent job of explaining basic .NET concepts and tying them into ArcObjects.This book was long overdue and it seems like the author really took his time to ensure the content was organized in a logical way and concepts are thoroughly explained.
I would recommend this book and Youtube video to anyone who is interested in learning ArcObjects in .NET. The both author includes .NET code samples as well as the solutions in C#/VB. Lots of useful stuff in there and I think when you finished you will have a good starting point to ArcGIS Desktop development.
Friday, January 23, 2015
Parenting Win-form and WPF form in ArcMap
Parenting of Win-form windows and WPF windows within a ArcMap application using C#.Net code snippets-
Step 1: Create a ArcMapWrapper.cs, wrapper class
using System;
using System.Windows.Forms;
using ESRI.ArcGIS.Framework;
namespace ArcMapClassLibrary2
{
class ArcMapWrapper:IWin32Window
{
private IApplication
_arcMapApplication;
public ArcMapWrapper( IApplication
mApplication)
{
_arcMapApplication = mApplication;
}
public IntPtr
Handle
{
get { return new IntPtr(_arcMapApplication.hWnd);
}
}
}
}
Step 2: Access from Win-form
WinForm fm = new WinForm();
ArcMapWrapper wrapper= new
ArcMapWrapper(map_application);
fm.ShowInTaskbar = false;
fm.Show(wrapper);
//Try, it behaves like a modal dialog
//fm.ShowDialog()
Subscribe to:
Posts
(
Atom
)