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
Layer identification (AKA LayerEnum) currently SmartSuite/ADF centric.
Layers (as implemented c. 2016) merely containers. → No information hiding
Layer management is principally in Project (via getLayer()).
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.
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).
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:
Entities and functions
List of things to consider when writing interfaces and concrete classes.
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
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 | | | Open | ParametricLineLayer | |
2.1.4 | | | | 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 | Open | TrackLayer | |
2.1.8 | Mike A | | 0.2 | Open | 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 | | | | | | |