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;        

              //Try, it behaves like a modal dialog

Create standalone feature class and feature class inside feature dataset on Geodatabase using ArcObjects

 public void StartUp()   
       //create gdb   
      const string path = "D:/SampleDatasets/NewShp";   
      const string fileGDBName = "sample.gdb";   
      const string fileGDBAddress = path + "/" + fileGDBName;   
      const string featureDatasetname="polygonFeatureClasses";   
      const string featureClassname = "MytestPolygons";   
      if (System.IO.Directory.Exists(fileGDBAddress))   
       Console.WriteLine("already exist");   
       // return;   
      Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory");   
      IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);   
      IWorkspaceName workspaceName = workspaceFactory.Create(path, fileGDBName, null,ArcMap.Application.hWnd);   
      MessageBox.Show("gbd created!");   
      //Create feature dataset   
      IFeatureWorkspace fws = workspaceFactory.OpenFromFile(fileGDBAddress, ArcMap.Application.hWnd) as IFeatureWorkspace;   
     //check the existance of FeatureDataset   
      IWorkspace2 ws = fws as IWorkspace2;   
       MessageBox.Show("Feature dataset is already exists");   

      #region feature Class inside feature Dataset : Region_1 (Choose either Region_1 or Region_2)  
      //Create a spatial refrence/extract spatial refrence from map   
      //Infuture will access through the arcmap   
      ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();   
      int coordinateSystemID = (int) esriSRGeoCSType.esriSRGeoCS_WGS1984;   
      ISpatialReference spatialReference =spatialReferenceFactory.CreateGeographicCoordinateSystem(coordinateSystemID);   

Free Opportunity to attend the ESRI USER Conference - 2015 User Conference Student Assistantship

Highly popular Lidar vocabularies

accuracy The closeness of an estimated value (for example, measured or computed) to a standard or accepted (true) value of a particular quantity. See precision.

absolute accuracy A measure that accounts for all systematic and random errors in a dataset. Absolute accuracy is stated with respect to a defined datum or reference system.

accuracyr (ACCr) The National Standards for Spatial Data Accuracy (NSSDA) (Federal Geographic Data Committee, 1998) reporting standard in the horizontal component that equals the radius of a circle of uncertainty, such that the true or theoretical horizontal location of the point falls within that circle 95 percent of the time. ACCRMSErr=×17308..

accuracyz (ACCz) The NSSDA reporting standard in the vertical component that equals the linear uncertainty value, such that the true or theoretical vertical location of the point falls within that linear uncertainty value 95 percent of the time. ACCRMSEzz=×19600..

horizontal accuracy The horizontal (radial) component of the positional accuracy of a dataset with respect to a horizontal datum, at a specified confidence level. See accuracyr.

local accuracy The uncertainty in the coordinates of points with respect to coordinates of other directly connected, adjacent points at the 95-percent confidence level.

network accuracy The uncertainty in the coordinates of mapped points with respect to the geodetic datum at the 95-percent confidence level.

positional accuracy The accuracy at the 95-percent confidence level of the position of features, including horizontal and vertical positions, with respect to horizontal and vertical datums.

relative accuracy A measure of variation in point-to-point accuracy in a data set. In lidar, this term may also specifically mean the positional agreement between points within a swath, adjacent swaths within a lift, adjacent lifts within a project, or between adjacent projects.

vertical accuracy The measure of the positional accuracy of a data set with respect to a specified vertical datum, at a specified confidence level or percentile. See accuracyz.
aggregate nominal pulse density (ANPD) A variant of nominal pulse density that expresses the total expected or actual density of pulses occurring in a specified unit area resulting from multiple passes of the light detection and ranging (lidar) instrument, or a single pass of a platform with multiple lidar instruments, over the same target area. In all other respects, ANPD is identical to nominal pulse density (NPD). In single coverage collection, ANPD and NPD will be equal. See aggregate nominal pulse spacing, nominal pulse density, nominal pulse spacing.
aggregate nominal pulse spacing (ANPS) A variant of nominal pulse spacing that expresses the typical or average lateral distance between pulses in a lidar dataset resulting from multiple passes of the lidar instrument, or a single pass of a platform with multiple lidar instruments, over the same target area. In all other respects, ANPS is identical to nominal pulse spacing
18 Lidar Base Specification
(NPS). In single coverage collections, ANPS and NPS will be equal. See aggregate nominal pulse density, nominal pulse density, nominal pulse spacing.
artifacts An inaccurate observation, effect, or result, especially one resulting from the technology used in scientific investigation or from experimental error. In bare-earth elevation models, artifacts are detectable surface remnants of buildings, trees, towers, telephone poles or other elevated features; also, detectable artificial anomalies that are introduced to a surface model by way of system specific collection or processing techniques. For example, corn-row effects of profile collection, star and ramp effects from multidirectional contour interpolation, or detectable triangular facets caused when vegetation canopies are removed from lidar data.
attitude The position of a body defined by the angles between the axes of the coordinate system of the body and the axes of an external coordinate system. In photogrammetry, the attitude is the angular orientation of a camera (roll, pitch, yaw), or of the photograph taken with that camera, with respect to some external reference system. With lidar, the attitude is normally defined as the roll, pitch and heading of the instrument at the instant an active pulse is emitted from the sensor.

Solution: IntelliJ not recognizing a particular file correctly, instead its stuck as a text file

I had mistakenly save my class as fileName.text file and tried to rename it with fileName .java but the IntelliJ couldn't recognize it and throws the error saying..
After spending long hours on internet, I found a solution and sharing/keeping here for future reference.

Step 1: Click "File"==> "Settings"
Step 2: Expand "Editor" & Click "File Types"
Step 3: You will see all file types on Right. Navigate to the "Text Files" and Click it
Step 4: You should able to see your file name on the bottom of Registered Patterns (lower box)
Step 5: Remove your file from the Registered Patterns. The problem should solved and let you to rename with
Step 6: If not, delete the file from the project and create it again with name fileName

Get PDF fonts information line by line using PDFBox API

Sample code snippet on extracting font information line by line using PDFBox API in JAVA.

 public String[] getFontLineByLineFromPdf(String fileName)throws IOException  
     PDDocument doc= PDDocument.load(fileName);  
     PDFTextStripper stripper = new PDFTextStripper() {  
       String prevBaseFont = "";  
       protected void writeString(String text, List<TextPosition> textPositions) throws IOException  
         StringBuilder builder = new StringBuilder();  
         for (TextPosition position : textPositions)  
           String baseFont = position.getFont().getBaseFont();  
           if (baseFont != null && !baseFont.equals(prevBaseFont))  
             prevBaseFont = baseFont;  
     String content=stripper.getText(doc);  
     String pdfLinesWithFont[]= content.split("\\r?\\n");  
     return pdfLinesWithFont;  

Call for Proposals, Presentations and Workshops: Free and Open Source Software for Geospatial 2015, Burlington, CA

FOSS4G North America will be hosted from March 9th to 12th, 2015 at the Hyatt Regency in Burlingame, California. This gorgeous venue is close to the San Francisco Airport and offers many quiet places to sit down and talk with friends and colleagues in addition to the great session rooms.
The deadline for the call for papers is today, Monday, November 17th.

Submit a presentation or workshop now.
Accepted speakers receive a free full access pass to the entire conference!

See which talks are already accepted.
FOSS4G NA 2015 is co-hosted with EclipseCon, and a PostgreSQL event.

Attend any talk or workshop for one low price.
FOSS4G North America is a collaborative event by OSGeo & LocationTech, organized by the Eclipse Foundation.

Register before December 31, 2014 and save!

Tips to share a leaflet map with multiple ROIs

Do you have a Leaflet map? Yes. Can you panned and and zoomed to a particular event or ROI in the map? Yes. Then, how can you share that map zoomed or centered with ROI/events to your webpage or email as a link? One of the answers may be set the zoom level and set view near the ROI.  Alright, what will you do if you have a map with multiple ROI/events? Do you make multiple maps with multiple zoom level and view? You can, but probably not a good idea to do that. 

The solution comes here, leaflet-hash.js, solves your needs, it is a JavaScript library written by Michael Lawrence Evans, which appends the URL hashes to web pages automatically and the hash changes with Leaflet map on drag or zoom. The hash consists of map zoom level and latitude/longitude of the center of map viewport, everything you need to share the map with focused ROI as link in following simple steps:

Recent Posts

Powered by Blogger.

Follow by Email

Total Pageviews