Giter VIP home page Giter VIP logo

esri / solutions-grg-widget Goto Github PK

View Code? Open in Web Editor NEW
3.0 39.0 3.0 764 KB

A GRG (Gridded Reference Graphic) is a grid overlay used for a common reference point in many situations - from cordon and search operations to security for presidential inaugurations.

License: Apache License 2.0

grg javascript solutions defense wab-widgets public-safety mgrs military gridded-reference-graphic data-management

solutions-grg-widget's Introduction

This repository is no longer maintained. The Gridded Reference Graphic (GRG) widget is now releasd in Web AppBilder for ArcGIS. To understand more about the GRG widget, the documentation can be found here. Issues with the Gridded Reference Graphic widget should be logged through Esri Support Services.

GRG Widget

A GRG (Gridded Reference Graphic) is a grid overlay used for a common reference point in many situations, including:

  • Cordon and search
  • Security
  • Search and Rescue

App

Try It Now

Sections

Features

Allows users to create an gridded reference graphic from:

  • An area
    • By Dimension
    • By Reference System
  • A point
    • By Dimension
    • By Reference System

Instructions

In order to develop and test widgets you need to deploy the GRG directory to the stemapp/widgets directory in your WebApp Builder installation.

Requirements

  • Minimum requirement is ArcGIS Web AppBuilder v.1.0.
  • Widget has been updated to v.2.6.

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

If you are using JS Hint there is a .jshintrc file included in the root folder which enforces this style. We allow for 120 characters per line instead of the highly restrictive 80.

Licensing

Copyright 2017 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

solutions-grg-widget's People

Contributors

adgiles avatar dbarnes1 avatar dfoll avatar joalvarez avatar joebayles avatar kgonzago avatar phill5136 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solutions-grg-widget's Issues

Label GRG in the margins

From @nfeuerstein on August 25, 2017 5:59

"Can the numbers and letters be on the side and not in the grid?" is often heard when demonstrating our current GRG widget. The GRG is often not the focus of the product, but rather a reference grid that is...well, referenced. It can be distracting to have the grid labels in the map, potentially covering up or crowding the focus of the product.

Copied from original issue: ArcGIS/national-security-ideas-engagements#71

Create MGRS GRG - Create GRG from Point

Widget

GRG

We need to implement functionality for creating an MGRS GRG from a start/origin point.

  1. select grid size
  2. select a point on a map OR type/paste an input point coordinate in a text box
    This will be the center point of new GRG
  3. Then, specify how many horizontal/vertical cells away you want (this will create the preview dynamically, similar to what we have for distance and direction)
  4. Then, click Create GRG and the GRG will be created, with the cells defined by the MGRS grid size

Checklist

  • implement logic for creating GRG based on MGRS by point
  • review logic for creating GRG based on MGRS by point
  • document this step
  • review documentation
  • review checklist test

Buffer origin as extent

Select origin and then type in a distance from origin to create a buffer as the extent for the GRG

Exposing the the showLabels function in the configuration

Update

The Show Label button should be moved from the Grid Settings > Label Settings dialog to the Publish GRG dialog, just below the Publish button. It should still default to ON.

Original Issue

A key part of the Gridded Reference Graphic is the label. In the traditional app creation workflow, we require users to open the config.json of the app after it is created to add the showLabels : true function.

I think a much cleaner way (and less for the user to screw up) is to expose that function to the user in the widget configuration, like a simple switch.
image

After some research and consultation w/ @kgonzago, this would require a bit more than just adding it. It would require:

  • Adding code to the widget
  • For the label to show up, the user must refresh the browser
  • If we were going to add an automatic refresh of the browser, that would require more work.

Area GRG from MGRS - Clipping vs Expanding

When creating a GRG from a sketched or selected area, most of the time, it won't match up perfectly with the already established MGRS grid. In this instance, the question is: should we clip or expand? Once the user has defined the AO, that will not change.
picture4

So, do we expand the GRG Grids so that they are all complete grids, or do we clip the grid to just the area requested by the user?

Expand
picture5

Clip
untitled-1

The consensus is that we default to expanding, but offer the option to select clipping.
image

FYI

@ArcGIS/arcgis-defense-solutions

Select existing layers to set extent

Select existing layers to set GRG extent:

  • polygon extent (neighborhood) plus lines (roads, rivers, etc)
  • point feature as origin
  • polygon (administrative area, police beat, etc)

Update status

View GRG on a mobile device and update status (not started, in progress, cleared, etc)

Need to allow user to create GRG area by entering bounding box coordinates

Widget

GRG

Version of widget

Bug or Enhancement

In the functionality to allow the user to create an GRG by area, we only allow the user to specify the GRG area by drawing on the map or selecting an existing feature layer. There are many times when the user has the bounding box/extent coordinates for the GRG they want to create. We need to allow the user to create a GRG area based on the bounding box coordinates for the area. This would also apply when the user is creating the GRG grid based on MGRS and USNG.

This should be part of the minimum viable product.

Repo Steps or Enhancement details

Add MGRS coordinate labels to MGRS grids in GRG Widget - MGRS Grids from Point

Enhancement

Add MGRS coordinates as an option for labeling cells in the grid when creating an MGRS grg from Point

Checklist

  • add labeling to grids created on MGRS grid from Point
  • test/verify correct MGRS labeling created from Point
  • update documentation for labeling
  • update configuration to work with new MGRS labels

Honor geodesy

Regardless of the size or scale of operation, the GRG should honor the curvature of the earth.

image

Create MGRS GRG - Create GRG from Area

Visualize MGRS/USNG on the map and zoom/pan to area of operations (manually or by zooming to existing layer).

Checklist

  • research how to integrate MGRS into the widget
  • decide how users should see the MGRS overlay as they draw/snap their start point or area
  • implement MGRS overlay
  • implement logic for creating GRG based on MGRS by area
  • review logic for creating GRG based on MGRS by area

It would be nice to provide some cartographically polished GRG MGRS lines

There is UI in the configuration pane for setting up color/line width/transparency for the grid lines. We have been talking about the possibility of exposing some of this to the user. I think that it would be useful for us to provide a set of two or three cartographically polished line sets that the user could pick from.
One could be adapted for imagery.
One could be for topo basemap.
etc...
Maybe a "light background/dark background" pair.

Overwrite GRG with new MGRS grid cell size

After discussing with @nfeuerstein, when creating GRG's, I'd like to be able to create a GRG in a particular location and then overwrite that GRG with new grid cells based on the Select Grid Size drop-down:
image

Right now, I have to re-draw the extent of my GRG every time I want to create a GRG. This shouldn't be necessary.

It would be two steps.

  1. select a new size in the drop down
  2. click "create GRG"

Set label placement

Set label placement:

  • center of grid
  • margins - will not be done in this issue!

Being able to set placement within the grid cell

Save configuration options

Choose default configuration options and save them so that the tool remembers preferences the next time a GRG is created.

Add MGRS coordinate labels to MGRS grids in GRG Widget - MGRS Grids from Area

Enhancement

Add MGRS coordinates as an option for labeling cells in the grid when creating an MGRS grg from Area

Checklist

  • add labeling to grids created on MGRS grid from Area
  • test/verify correct MGRS labeling created from Area
  • update documentation for labeling
  • update configuration to work with new MGRS labels

Set grid cell size - create GRG from Area

Feature: Enable users to set the grid cell size when creating GRG from Area. When they are creating a GRG from area with MGRS, this means setting the MGRS cell size. When creating a GRG from area with size/dimension, this means setting the width and height of each cell, or alternatively specifying the number of horizontal and vertical cells

Set grid cell size:

  • MGRS level (10m, 100m, 1km, 10km, etc)
  • type in number of horizontal/rows and vertical/columns within extent
  • type in size of cell and set units (meters, feet, miles, yards, etc)

Checklist

  • Review UI for grid creation. Do we want different options for MGRS, point, and area? Or do we want to integrate MGRS into our current point/area options?
  • review current workflow for typing in cell size or number of cells. Does this need to be changed?
  • implement MGRS grid on map
  • implement setting the grid size based on MGRS levels
  • review implementation of the grid size based on MGRS
  • implement any changes to typing number of cells vs. typing in cell size
  • document grid cell size creation process

Save the GRG

Save the GRG as a feature service/portal item

Export GRG

Updated Issue:

  • Export from ArcGIS Desktop
  • Export from Portal/ArcGIS Online

Original Issue:

Export GRG to:

  • .shp
  • .kmz
  • FC/GDB
  • .lyr

May be able to leverage feature service export capability to satisfy these needs

Set label type - Create GRG from Area

Set label type:

**GRG by Dimension/Size **

  • alpha-alpha (with separator)
  • alpha-numeric
  • numeric

GRG from MGRS

  • mgrs

Checklist

  • implement functionality
  • review functionality
  • check against documentation

Create GRG from Area - Dimension not with base angle rectangle (two clicks), but with click-and-drag rectangle (one click)

Widget

GRG

Enhancement

Currently, we are drawing GRGs based on an area by setting a base angle and then completing a rectangle, which takes two clicks.
1.
image
2.
image

The main drawback here is that it is hard to cover your intended area when the first thing you do is set the base angle. In addition, labeling issues like this one: #11 could arise more easily when the first thing you do as a user is set any base angle for the GRG.

A more useful way to draw a AOI to create a GRG when interactively drawing an area is by clicking and dragging a rectangular preview (preview below). This is currently how the create GRG from Area from MGRS works.
image

To set the angle, an enhancement to interactively rotate and scale the preview AOI rectangle would need to be added. This can be documented here: #30

We don't necessarily have to replace the functionality since the released version of the GRG widget has users set the base angle, but I propose we give users both options and making the new click-and-drag rectangle the default might be our best route.

This also doesn't have to be done as part of our current release, but it would greatly help the usability of creating a GRG from area with a dynamically drawn dimension.

Neighborhood GRG

Discussing the GRG Widget w/ Larry Strasser, he mentioned that he's seen/used "non-standard" GRGs that were built from "organic" shapefiles, creating a reference grid from breaks in neighborhoods, lines of communication, water features, etc. With the advent of vector basemaps and the datasets that drive them, we could create a tool that develops an "NRG" for the same uses cases as the GRG.

Grid Labeling above or below the zipper

At certain latitudes or specific locations, the MGRS grid may "close the zipper", when longitudinal grid lines will merge, throwing off the grid.
image

In creating a reference grid from a reference system, how should the labeling iterate? My suggestion is that the widest amount of squares is numbered sequentially, and the narrower amounts of squares skip those missed numbers, so that the grid persists.

image

Otherwise, it looks like this:
image

FYI

@ArcGIS/arcgis-defense-solutions

Disable Grid Origin setting from Create GRG by Area

Currently, the grid settings are the same regardless of whether you're creating a GRG by Area or a GRG by point. One of the issues with this is that when you create a GRG by area, the grid origin is defined as you draw the lines that will make up your rectangular grid.

I propose that the Grid Origin setting be removed from the grid settings when you access them for Create GRG by Area.

I understand that we may only have one settings page for both Create GRG by Area and Create GRG by Point, but this difference makes it so that we may need to differentiate between the two. I expect that as we add Create GRG from MGRS, we may have distinct settings for that as well.

Mock Up UI

With all of the additions planned, mocking up the UI would be beneficial. I will iterate on this below.

@ArcGIS/arcgis-defense-solutions

Set grid cell size - create GRG from Point - MGRS

Feature: Enable users to set the grid cell size when creating GRG from a start Point. When they are creating a GRG from point with MGRS, this means setting the MGRS cell size.

Set grid cell size:

  • MGRS level (10m, 100m, 1km, 10km, etc)

Checklist

  • implement MGRS grid, create GRG from point MGRS
  • implement setting the grid size based on MGRS levels
  • review implementation of the grid size based on MGRS

Disable Label Start Position from Create GRG by Area

It looks to me like when you create a GRG based on an Area, you can set whatever base angle you want. This renders the label start position as inaccurate unless you set your base angle at about 90 or 270 degrees.

I think that, as a result, the Label Start Position option should be disabled from the grid settings page when you Create a GRG by Area.

To replicate the issue I'm seeing:

  1. Navigate to the Create GRG by Area page, and then navigate to the Grid Settings Page

  2. In the Grid Settings Page, make sure that the Label Start Position is set to Lower-Left

  3. Create a GRG by Area, from your start point drag the base angle at about 90 degrees from north. You'll see the labels appear in the proper location, like so:
    image

  4. Now, create a GRG by Area and from your start point drag the base angle south (180 degrees). You'll see the label appears in the upper-left instead of its proper location:
    image
    Or if you do it slightly differently (just over 180), it'll draw in the lower-right.
    image

Basically, I'm not exactly sure how this works, but the further away you get from drawing your base angle at either 90 or 270 degrees (which appears on the map as relatively flat), this doesn't seem to work.

Red Preview dot persists when clicking away from Create GRG from Point

Issue:
Looking through the UI of the widget, I noticed that if I start creating a GRG from a Point, either by clicking on the map or entering a coordinate location, and then I decide I want to create a GRG from area, the red preview dot will persist until I finish creating that GRG.

Desired workflow:
When exiting out of the Create GRG from Point page in the widget, the red preview dot will automatically be removed from the map.

How to replicate:

  1. Navigate to the Create GRG from Point page in the widget.
  2. Use the map point tool to click on a location on the map; red dot will appear.
  3. Click the back button; you'll be redirected to the main widget page, but the red dot will persist on the map.

Everything looks ok at first:
image
When you click the back button, the red dot is still there:
image

GRG Widget cell size in creation

From @topowright on March 7, 2017 0:32

Widget

GRG Widget

Version of widget

1.0

Bug or Enhancement

Bug

Repo Steps or Enhancement details

We have attempted to create a graphic that covers an area that should have each grid be 100 X 100; however, this is what we get.

image

Copied from original issue: Esri/solutions-webappbuilder-widgets#847

GRG and MGRS/USNG integration

From @nfeuerstein on August 18, 2017 17:29

The USNG and MGRS are the standard for organizations operating in the Defense/Para-Military/Emergency Response world. Most users are now using MGRS/USNG to derive Grid Reference Graphics (GRGs) for defined operations.

For example, a 10m grid MGRS GRG would look like this:
image

In addition, in order to not crowd/confuse the target map, the interior grids should be able to have the transparency adjusted and be turned on/off.

The Military Grid Reference System (MGRS) and its civilian analogue, the United States National Grid (USNG), are the primary coordinate systems used by NATO forces and U.S.-based emergency responders. MGRS may also be used as area reference system through which uniform areas may be described using a coordinate of appropriate precision to describe the lower-left corner of a square. This method functionally creates both a vector-based analysis mask and raster-cell structure. Aggregation of data within MGRS polygons thereby allows for the application both advanced statistical analysis and modeling techniques to data sets

Additional reading materials:

Copied from original issue: ArcGIS/national-security-ideas-engagements#1

Using the GRG widget to create a predefined amount of rows and columns

From @topowright on March 9, 2017 20:3

Widget

GRG Widget

Version of widget

1.0

Bug or Enhancement

Enhancement

Repo Steps or Enhancement details

LAPD and Homeland Security Advisory Council (HSAC) http://www.hsacouncil.org/ would like to use the GRG widget to create a grid over a predefined area such as a neighborhood. They would want the grid to match the street network. If I had a area covering a area that was three streets by five streets it would be a 3 x 5 grid.

Copied from original issue: Esri/solutions-webappbuilder-widgets#850

Set label order

Set label order:

  • lower left
  • lower right
  • upper left
  • upper right
  • center
  • by polygon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.