User Tools

Site Tools


android:layer_generalization

This is an old revision of the document!


Layer Generalization discussion

(8-11-16)

The Problem

  • Original layers are line and point oriented (only). → Base Layer type is insufficiently abstract
    • Subtyping carries too much base functionality for other types.
  • Layer identification (AKA LayerEnum) currently SmartSuite/ADF centric.
    • Non-ADF implementation difficult to generalize.
  • Layers (as implemented c. 2016) merely containers. → No information hiding
  • Layer management is principally in Project (via getLayer()).
    • ADF (single layer type) vs. KML (multiples of layers)

Current Layer Uses

  • SmartDirt - ADF centric/classic
  • SmartGrade - ADF centric/classic
  • SmartBlade - ADF centric/classic
  • SmartPlan - ADF/KML heavily modified
  • TrackManager - ADF/KML-heavily modified

Use cases

  • Lines / points representing a SD/SG surface
  • Colored triangles representing isopach
  • Placemarks representing benchmarks
  • Placemarks representing user entered Note
  • Placemarks representing user entered Photo
  • Lines for tracks

New Layer Definition

The purpose of a Layer is to aggregate objects into collections for the user's convenience such as display and selection.

  • Collection of data and drawables.
    • May take parameters in form of color and/or images for display.
  • Layers have children (zero or more children)
  • Mediates UI interaction with data
    • selection via on screen picking
    • selection via select() method to the layer
    • ViewLists (tree view of all layers)
  • Data may be:
    • lines/points
    • surfaces
    • images; AKA plansheets, ground overlay types of things
    • placemarks
    • Polygon; AKA measure/report area, etc.
  • LayerManagement
    • Application specific - Separate (from Project) layer manager for each application type
    • Layer have a unique identifier (today LayerEnum).
      • example: Note1 vs Note2, or Design vs. Existing
    • Responsible for interpreting data source to layer generation.
    • Look at LayerFactory in SP (or default impl) for example

Parking Lot

  • Measure area should not refer to drawables and layers. A MeasureAreaLayer ought to refer to a MA and do it's own drawables. Currently MA is and invert of what other layers are (e.g. SimpleLine3D doesn't know it's layer).
  • 2016-09-05 items for Sept 9:
    • SmartGrade wants to be able to track if visibility has changed; layer function or appearance adapter fun?

Entities and functions

List of things to consider when writing interfaces and concrete classes.

  • Layer and possibly layer subclasses
    • Layer identification (LayerEnum replacement)
    • Get / create drawables
    • Detect selection via touch on screen (in world coords)
    • Set / Get as selected (implied new / modified drawable state)
  • LayerFactory
    • Find layer
    • Create layer
    • Delete layer (AKA recycle)
  • Refactor items
    • Remove legacy Util.DIP calls, use apppearance adapter
    • Remove legacy color setting, use appearance adapter
    • Remove legacy layer management methods from project; replace with appropriate object
    • Remove external layer graphic compilation from Project(s), replace with layer subtype(s)
    • Remove external layer manipulation from MeasurementArea, replace with appropriate delegate (objects)

2016-09-16 conclusions

  • What types of user interaction are there between UI and data?
    • Find closes pt
    • set graphic selected
    • is user controllable
    • is visible
  • Probably have different types of layer factories based on source: KMZ vs. ADF
  • Dyanmic drawables (user location, etal) use custom drawables
  • added Layer .getMin(), .getMax() implementation to derive from backing data object
  • draw order added to layer, mja to investigate rendering workers to see best impl.
  • Ninja layers supported via isUserControllable().

Work for 2017-09-23 conclusions

  • Complete Layer and LayerFactory interfaces, javadoc them
  • Detail concrete implementation classes
  • Divide work
  • Write task list for refactor effort
    • Write concrete implementations of KMZ/ADF layer factories
    • Write concrete layer implementations for known objects.
    • Refactor Project to use Layer factories
    • Refactor Measure area to use layer
    • Refactor all the stuff that broke because of the previous items.
  • Start.

Layer Factory & Layer Tasks (ADF)

Open Issues

  1. What about when data changes. i.e. Adding data to a track.
Task Number Owner Estimate Actual Status Description Notes
1 Layer Factor
1.1 0.5 Done Define objects for Layers 1) BM's, 2) Line & Pt, 3) Parametric line, 4) Colored surface, 5) Ground overlays, 6) Polygonal areas, 7) Notes, 8) Photos, 9) Tracks, 10) Measure, 11) MC Blade, 12) User Arrow, 13) Grade Rods
1.2 Mike A 0.5 Layer/Factory Interfaces
1.2.1 Mike A - Done Complete Layer/Factory Interfaces Notes and Java Doc'ing
1.2.2 Mike A - Done Add listeners For when drawable changes or selection occurs
1.2.3 Mike A - Done Abstract Layer class isVisible, isDirty, isSelected, Label, Controllable, color, children
1.3 Bill C Open ADF LayerFactory
1.4 Mike A Open KMZ LayerFactory
1.5 Open Rework Project for LayerFactory Interface
2 Layers
2.1 Implement Layers 1) Add/Remove Accessors 2) Selection
2.1.1 Mike A 0.2 Done PlacemarkLayer BM, Notes, Photos
2.1.2 Bill C 0.25 Done LineLayer
2.1.3 Bill C - Done ParametricLineLayer SG-563 Disabled
2.1.4 Bill C Open ColoredSurfaceLayer
2.1.5 Mike A 0.05 Done GroundOverlayLayer
2.1.6 Mike A 0.1 Done PolygonLayer
2.1.7 Mike A 0.05 Done TrackLayer
2.1.8 Mike A 0.2 Done MeasureLayer Extract layer func from MeasurementArea
2.1.9 Open BladeLayer
2.1.10 Mike A Open UserArrowLayer
2.1.11 Open GradeRodLayer
2.9 1 Open Appearance adapter These control layer visibility, color, linewidth and gpyphsize. Knowing when a layer is and isn't visible is complicated for apps such as SmartGrade.
3 Complete port
3.1 Open SmartDirt
3.2 Open SmartGrade
3.3 Open SmartBlade
3.4 Open SmartPlan
3.5 Open TrackMgr
4 Open Graphics
4.1 Mike A Open Define Draw Order rules
4.2 Open Drawable Accessors
4.3 Open Generic Appearance Adapter
Total
android/layer_generalization.1474998562.txt.gz · Last modified: 2016/09/27 17:49 by mjallison