development of linear measure tool using application framework

11
Development of Linear Measure Tool using Application Framework Venkatesh Merwade

Upload: brittany-lynch

Post on 31-Dec-2015

33 views

Category:

Documents


1 download

DESCRIPTION

Development of Linear Measure Tool using Application Framework. Venkatesh Merwade. Overview. Necessity for Linear Referencing Application Framework About Linear Measure Tool PolylineM LengthDown Application of LMT Conclusions, Acknowledgements, Questions!. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Development of Linear Measure Tool using Application Framework

Development of Linear Measure Tool using Application Framework

Venkatesh Merwade

Page 2: Development of Linear Measure Tool using Application Framework

Overview

Necessity for Linear ReferencingApplication FrameworkAbout Linear Measure Tool

– PolylineM– LengthDown

Application of LMTConclusions, Acknowledgements,

Questions!

Page 3: Development of Linear Measure Tool using Application Framework

Necessity for Linear Referencing

GIS often represents spatial information with two dimensional coordinate systems.

Location of river gauging station – x,y coordinates - (992506,301256) – Linear measure - HydroCode = 30021, m=165

Add route events Find distance between two points and so on.

Page 4: Development of Linear Measure Tool using Application Framework

Application Framework What is it??

It’s an ArcMap extenstionDesigned to access ArcMap layers for input

and create new output layers (right now used only for input).

Page 5: Development of Linear Measure Tool using Application Framework

Why AppFramework?

Here is how it all works1. Get hold of MxDocument

2. Get hold of Map

3. Get hold of FeatureLayer

4. Get hold of FeatureClass

5. Get hold of required Field in FeatureClass

6. Do Something, have fun!

7. Display resultsAppFramework

Page 6: Development of Linear Measure Tool using Application Framework

Sub LengthDown()

Dim pMxDoc As IMxDocument

Dim pMap As IMap

Set pMxDoc = ThisDocument

Set pMap = pMxDoc.FocusMap

Dim pFLayer As IFeatureLayer

Dim pFeature As IFeature

Set pFLayer = pMap.Layer(0)

Dim pFC As IFeatureClass

Set pFC = pFLayer.FeatureClass

Dim pTable As ITable

Set pTable = pFC

Dim j As Long

j = pTable.FindField(“LengthDown")

If j = -1 Then

MsgBox “Field not found"

Exit Sub

End If

MsgBox “Field Found”

End Sub

Page 7: Development of Linear Measure Tool using Application Framework

Linear Measure Tool (LMT)

It’s developed in Visual Basic as a DLL.Uses AppFramework for input.Register in ArcMap to use it.Toolbar with some cool options for Linear

Referencing.Works only with PolylineM layer and uses

LengthDown for multiple features option.

Page 8: Development of Linear Measure Tool using Application Framework

Why LMT is so cool!

It has some cool options!– Assign Ms

– Read Ms

– Finds out distance between two points

– Deals with both Individual and Multiple Features

Changes the MDomain on fly if necessary It flashes but never crashes (sometimes gives

error message, but that’s not LMT, it’s user!)

Page 9: Development of Linear Measure Tool using Application Framework

Application of LMT

Page 10: Development of Linear Measure Tool using Application Framework

Conclusions

Using Visual Basic, I can do some cool stuff too. It’s very easy.

Here we are dealing with only one type of Layer (PolylineM). AppFramework is more useful when dealing with different types of layers and fields.

Page 11: Development of Linear Measure Tool using Application Framework

Acknowledgements

Dr. MaidmentTim WhiteakerCRWR crew