missioncommand / emp3-web

Extensible Map Platform (EMP) web development kit
Other
19 stars 9 forks source link

Tactical Graphics multipoint should fail if plotted on the maps with less than the minimum required number of coordinates. #316

Closed mubinakhan closed 7 years ago

mubinakhan commented 7 years ago

-Go to WW map. -Add a quick overlay -Go to general/ Create a mil-stand symbol/add name /add geo-id /add any two positions Coordinates(45,52) -select tactical graphics/tasks/Block Test -create Symbol add to overlay. -Map shows symbol plotted to map successfully and added to overlay -This should fail when plotting .

alberto-acevedo commented 7 years ago

In WW the feature with invalid number of coordinates render on the map with no shapes. No shapes means nothing to see on the map. I added a condition in WW to skip calling the renderer worker for invalid mil std features. The API tester is not rejecting or validating the mil std features that are sent to the engines. In contrast, the cesium engine completely rejects and nothing is render on the map. The correct behavior would be for the core to validate and reject invalid features and to notify the API tester or any client that sent the request. By rejecting, the engines never get invalid requests. The second option is to reject at the engine level like Cesium currently does. Need to discuss with the team.

alberto-acevedo commented 7 years ago

Decided to add a validation in the API. The API MilStdSymbol class now checks for invalid coordinates. It checks for min and max number of coordinates for a specific symbol code and standard. If invalid, the API will fill out the missing coordinates , or remove any coordinates beyond the max allowed.

Found a hardcoded symbol standard = 0 in the emp3-api class that was generating a single point feature for the multi point KILL BOX BLUE IRREGULAR.

alberto-acevedo commented 7 years ago

Test case:

Use the dev branch.

-Go to WW map. -Add a quick overlay -Go to general/ Create a mil-stand symbol/add name /add geo-id /add any two positions Coordinates(45,52) -select tactical graphics/tasks/Block Test -create Symbol add to overlay. -Map shows symbol plotted to map successfully and added to overlay

mubinakhan commented 7 years ago

Reintegrate

alberto-acevedo commented 7 years ago

Merged into the dev branch. Closing this issue