Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMGIS 2.5.0 #125

Merged
merged 98 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
b1217f0
Search limit and fix globe elev coords
tariqksoliman Aug 9, 2021
a42398c
Merge pull request #96 from NASA-AMMOS/search-limit
tariqksoliman Aug 9, 2021
862bdf8
Smarter short link, draw tool buffer compile inward
tariqksoliman Aug 16, 2021
0c07655
Upgrade lithosphere
tariqksoliman Aug 19, 2021
23bd499
Add isochrone tool
Jul 14, 2021
ba6f836
Merge pull request #97 from frasercl/isochrone
tariqksoliman Aug 19, 2021
8aca6ab
Convince viewshed to play nice w/ polar maps
Aug 11, 2021
782e7af
Merge pull request #98 from frasercl/viewshed-polar
tariqksoliman Aug 31, 2021
c614bc9
Fix Globe geodatasets and integrate demFallback
tariqksoliman Sep 1, 2021
41a54e9
Fix DrawTool litho layer removal
tariqksoliman Sep 2, 2021
5b88309
Ignore pycache, ds_store, and extra data dir
jtroberts Sep 14, 2021
41b9373
Allow processing without colormap and include prefix in output filename
jtroberts Sep 14, 2021
c685a47
Fixed epsg typo
jtroberts Sep 14, 2021
04e4b87
Use percentages for sample color table
jtroberts Sep 14, 2021
82ba754
Allow for optional help page route
jtroberts Sep 14, 2021
0a726e2
Option to calculate distance between points with Vincenty's formulae
jtroberts Sep 14, 2021
3ee5f16
Allow marker radius to be set by feature radius property
jtroberts Sep 14, 2021
991e01c
Merge pull request #104 from NASA-AMMOS/aux-updates
jtroberts Sep 14, 2021
04b2041
#105 Deep Linking - centerPin
tariqksoliman Sep 16, 2021
7cca7ab
Merge pull request #106 from NASA-AMMOS/issue-105-centerPin
tariqksoliman Sep 16, 2021
fb3e13b
Add yes flag to Dockfile apt-get update
tariqksoliman Sep 16, 2021
d4bbf5d
Use svg as logo
tariqksoliman Sep 16, 2021
c79b690
#107 part 1
tariqksoliman Sep 23, 2021
c25b482
Disable Globe highlighting
tariqksoliman Sep 23, 2021
183e3ad
IdentiferTool - use asHTML CursorInfo
tariqksoliman Sep 27, 2021
17798cf
#107 1
tariqksoliman Sep 27, 2021
dd65fef
Roll HTML2Canvas back to rc5
tariqksoliman Sep 27, 2021
463214c
Fix globeLon deeplink
tariqksoliman Sep 27, 2021
e717214
DrawTool Annotations 2
tariqksoliman Sep 29, 2021
9120a95
DrawTool Annotations 3
tariqksoliman Sep 29, 2021
2bcecd8
DrawTool Annotations 4
tariqksoliman Sep 29, 2021
1b1c871
Merge pull request #108 from NASA-AMMOS/ts-107
tariqksoliman Sep 29, 2021
633fcc3
Bugfix - Description info for intially off layers
tariqksoliman Sep 29, 2021
c81d642
Bugfix - Reload Vector tile layers
tariqksoliman Sep 29, 2021
343584c
Bugfix - Reload Vector tile layers 2
tariqksoliman Sep 29, 2021
b5f821b
Touch ups and Layer Url docs
tariqksoliman Sep 29, 2021
e19477a
Coordinates and Search touch ups
tariqksoliman Sep 30, 2021
ad29880
Search touch ups 2
tariqksoliman Sep 30, 2021
04f85a4
DrawTool - Text Rotation
tariqksoliman Oct 6, 2021
c3c17a2
Fix for annotation features that are on initially
tariqksoliman Oct 11, 2021
e347f94
Fix text rotation anchor and Search layer toggle bug
tariqksoliman Oct 19, 2021
286985e
Fix MeasureTool for Globe
tariqksoliman Oct 19, 2021
0a5a933
Fix MeasureTool for Globe 2
tariqksoliman Oct 19, 2021
3f044ae
Merge pull request #112 from NASA-AMMOS/ts-111
tariqksoliman Oct 19, 2021
655cc63
Support ENMultipier for rxy and site coords
tariqksoliman Oct 25, 2021
48067a9
Prevent legend items from getting squished
jtroberts Nov 8, 2021
9fb1e7c
Merge pull request #113 from NASA-AMMOS/legends-spacing
jtroberts Nov 8, 2021
801a4ea
#144 Marker bearings 1
tariqksoliman Nov 12, 2021
8b8ba61
#114 Improved marker bearings, support rotated markerIcons, docs
tariqksoliman Nov 15, 2021
1d58a4e
#114 docs - markerIcon should point north if used as a bearing
tariqksoliman Nov 15, 2021
2a23265
#115 MeasureTool - Continous profile
tariqksoliman Nov 24, 2021
16bdc81
#115 MeasureTool - Continuous profile, colored segments, accurate cha…
tariqksoliman Nov 24, 2021
07a0735
#115 MeasureTool - Reset state when tool retoggled
tariqksoliman Nov 24, 2021
4b63a41
#144 Rework marker vars and include uncertainty ellipse
tariqksoliman Nov 30, 2021
d1ba43b
#114 Sublayers Object, togglable uncertainty ellipses, configurable r…
tariqksoliman Nov 30, 2021
7bcc5ef
#115 MeasureTool - Color mode, 3D distance, Globe lines
tariqksoliman Dec 2, 2021
9e413f1
Merge pull request #116 from NASA-AMMOS/ts-115
tariqksoliman Dec 2, 2021
84ae2bf
#117 Increased width of legend tool and allow line breaks when needed
jtroberts Dec 6, 2021
e6bed2b
Merge pull request #118 from NASA-AMMOS/jr-117
jtroberts Dec 6, 2021
b290735
#114 Model layer and 3d bearing support (warning uses local litho)
tariqksoliman Dec 9, 2021
7bc13e8
#119 Python3 version of gdal2customtiles.py
tariqksoliman Dec 9, 2021
c84ae6c
Merge pull request #120 from NASA-AMMOS/ts-119
tariqksoliman Dec 9, 2021
e3a59e8
#114 Image and Model markerAttachments
tariqksoliman Dec 10, 2021
e687147
#114 Model sublayers
tariqksoliman Dec 11, 2021
64302b8
Use published lithosphere
tariqksoliman Dec 13, 2021
442c5ed
Merge pull request #121 from NASA-AMMOS/ts-114
tariqksoliman Dec 13, 2021
c4d04b3
#122 Layer Filter part 1
tariqksoliman Dec 16, 2021
502c871
#122 Layer Filter - clean up UI so far
tariqksoliman Dec 17, 2021
92d7d2c
#122 Query Layer test 1
tariqksoliman Jan 4, 2022
865ee89
#122 Body Wrapper
tariqksoliman Jan 4, 2022
1adf396
#122 withCreds
tariqksoliman Jan 4, 2022
a314a13
#122 more logs
tariqksoliman Jan 5, 2022
ee055ef
#122 esFilter promise
tariqksoliman Jan 5, 2022
29a138f
#122 esFilter prop object
tariqksoliman Jan 5, 2022
eb11ff8
#122 Query Layer as empty vector
tariqksoliman Jan 5, 2022
eda3867
#122 Actual ES Filter
tariqksoliman Jan 5, 2022
deb6f9d
#122 Check for empty filter
tariqksoliman Jan 5, 2022
ecae439
#122 Reduce ESFilterer Return size
tariqksoliman Jan 5, 2022
faa8c1b
#122 esResponses
tariqksoliman Jan 5, 2022
6d20f2f
#122 Fix ESFilterer fields
tariqksoliman Jan 5, 2022
60e5877
#122 Link replace With
tariqksoliman Jan 5, 2022
5d163b2
#122 Spatial Filters
tariqksoliman Jan 5, 2022
181cdc6
#122 Spatial Filters 2
tariqksoliman Jan 5, 2022
fc1fbd1
#122 Spatial Filters 3
tariqksoliman Jan 6, 2022
8d103e7
#122 Spatial Filters Cleanup
tariqksoliman Jan 6, 2022
b397ccf
#122 EsFilter account for 0 results
tariqksoliman Jan 6, 2022
a595e38
#122 Filtering Touchups
tariqksoliman Jan 7, 2022
e9b9444
#122 Fix query layer polygon highlighting
tariqksoliman Jan 7, 2022
27d3e64
#122 Bug fixes
tariqksoliman Jan 7, 2022
ed7f702
#122 Final Touches
tariqksoliman Jan 8, 2022
1010f59
#122 Fix fillOpacity setStyle (not per feature)
tariqksoliman Jan 8, 2022
6051125
#122 Touch ups 2
tariqksoliman Jan 8, 2022
77c1d11
Bump winston for colors fix
tariqksoliman Jan 10, 2022
e9450e0
#122 Add Query Layer docs
tariqksoliman Jan 10, 2022
679ef60
#122 Spatial Filter account for current planet radius
tariqksoliman Jan 10, 2022
16f61ee
Merge pull request #124 from NASA-AMMOS/ts-122
tariqksoliman Jan 10, 2022
6e4f0e5
Update MMGIS API vector layer functions (#123)
ac-61 Jan 10, 2022
b39f36d
Bump to 2.5.0
tariqksoliman Jan 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ Missions
Missions_rel
Missions_dev
.env
**/.git
**/.git
data
*DS_Store
*__pycache__
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
/src/pre/tools.js

/build/*
/data/*
*__pycache__

sessions

Expand Down
29 changes: 20 additions & 9 deletions API/Backend/Draw/models/published.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,50 @@ const { sequelize } = require("../../../connection");
const attributes = {
intent: {
type: Sequelize.ENUM,
values: ["roi", "campaign", "campsite", "trail", "signpost"],
values: [
"roi",
"campaign",
"campsite",
"trail",
"signpost",
"polygon",
"line",
"point",
"text",
"arrow",
],
allowNull: false,
unique: false,
defaultValue: null
defaultValue: null,
},
parent: {
type: Sequelize.DataTypes.INTEGER,
unique: false,
allowNull: true
allowNull: true,
},
children: {
type: Sequelize.DataTypes.ARRAY(Sequelize.DataTypes.INTEGER),
unique: false,
allowNull: true
allowNull: true,
},
level: {
type: Sequelize.INTEGER,
unique: false,
allowNull: false
allowNull: false,
},
properties: {
type: Sequelize.JSON,
allowNull: true,
defaultValue: {}
defaultValue: {},
},
geom: {
type: Sequelize.GEOMETRY,
allowNull: true
}
allowNull: true,
},
};

const options = {
timestamps: false
timestamps: false,
};

var Published = sequelize.define("publisheds", attributes, options);
Expand Down
143 changes: 84 additions & 59 deletions API/Backend/Draw/routes/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ router.post("/getfile", function (req, res, next) {
(req.body.test === "true" ? "publisheds_test" : "publisheds") +
"" +
(req.body.intent && req.body.intent.length > 0
? " WHERE intent=:intent"
? req.body.intent === "all"
? " WHERE intent IN ('polygon', 'line', 'point', 'text', 'arrow')"
: " WHERE intent=:intent"
: ""),
{
replacements: {
Expand Down Expand Up @@ -698,7 +700,14 @@ const compile = function (req, res, callback) {
where: {
is_master: true,
intent: {
[Sequelize.Op.in]: ["roi", "campaign", "campsite", "trail", "signpost"],
[Sequelize.Op.in]: [
"roi",
"campaign",
"campsite",
"trail",
"signpost",
"all",
],
},
},
}).then((files) => {
Expand Down Expand Up @@ -775,11 +784,11 @@ const compile = function (req, res, callback) {
" " +
"AND a.id != b.id" +
" " +
"AND ((ST_OVERLAPS(a.geom, b.geom)" +
"AND ((ST_OVERLAPS(ST_BUFFER(a.geom, -0.000005, 'join=mitre'), b.geom)" +
" " +
"AND NOT ST_Touches(a.geom, b.geom))" +
" " +
"OR ST_CROSSES(a.geom, b.geom))" +
"OR ST_CROSSES(ST_BUFFER(a.geom, -0.000005, 'join=mitre'), b.geom))" +
" " +
"UNION ALL" +
" " +
Expand Down Expand Up @@ -810,6 +819,7 @@ const compile = function (req, res, callback) {
.spread((results) => {
let hierarchy = [];
let intentOrder = ["roi", "campaign", "campsite", "signpost"];
let excludeIntents = ["polygon", "line", "point", "text", "arrow"];
let flatHierarchy = [];
let issues = [];
let changes = [];
Expand All @@ -819,32 +829,36 @@ const compile = function (req, res, callback) {
let intersects = [];
let contains = [];
let children = [];
for (let r = 0; r < results.length; r++) {
if (results[r].id == features[f].id) {
let childProps = JSON.parse(results[r].associated_properties);
if (results[r].association === "intersects") {
intersects.push({
name: childProps.name,
uuid: childProps.uuid,
id: results[r].associated_id,
intent: results[r].associated_intent,
});
} else if (results[r].association === "contains") {
contains.push({
name: childProps.name,
uuid: childProps.uuid,
id: results[r].associated_id,
intent: results[r].associated_intent,
});
children.push({
name: childProps.name,
uuid: childProps.uuid,
id: results[r].associated_id,
intent: results[r].associated_intent,
});

if (!excludeIntents.includes(features[f].intent)) {
for (let r = 0; r < results.length; r++) {
if (results[r].id == features[f].id) {
let childProps = JSON.parse(results[r].associated_properties);
if (results[r].association === "intersects") {
intersects.push({
name: childProps.name,
uuid: childProps.uuid,
id: results[r].associated_id,
intent: results[r].associated_intent,
});
} else if (results[r].association === "contains") {
contains.push({
name: childProps.name,
uuid: childProps.uuid,
id: results[r].associated_id,
intent: results[r].associated_intent,
});
children.push({
name: childProps.name,
uuid: childProps.uuid,
id: results[r].associated_id,
intent: results[r].associated_intent,
});
}
}
}
}

let featureProps = JSON.parse(features[f].properties);
flatHierarchy.push({
feature: features[f],
Expand Down Expand Up @@ -976,28 +990,32 @@ const compile = function (req, res, callback) {
//Build the root of the trees
for (let f = 0; f < features.length; f++) {
let isCovered = false;
for (let r = 0; r < results.length; r++) {
if (
results[r].association === "contains" &&
results[r].associated_id == features[f].id
) {
isCovered = true;
break;
if (!excludeIntents.includes(features[f].intent)) {
for (let r = 0; r < results.length; r++) {
if (
!excludeIntents.includes(results[r].intent) &&
results[r].association === "contains" &&
results[r].associated_id == features[f].id
) {
isCovered = true;
break;
}
}

if (!isCovered) {
let featureProps = JSON.parse(features[f].properties);
hierarchy.push({
intent: features[f].intent,
id: features[f].id,
name: featureProps.name,
uuid: featureProps.uuid,
children: {
intersects: [],
contains: [],
},
});
continue;
}
}
if (!isCovered) {
let featureProps = JSON.parse(features[f].properties);
hierarchy.push({
intent: features[f].intent,
id: features[f].id,
name: featureProps.name,
uuid: featureProps.uuid,
children: {
intersects: [],
contains: [],
},
});
continue;
}
}

Expand Down Expand Up @@ -1099,7 +1117,7 @@ const compile = function (req, res, callback) {
}
}

//The Saviorng
//The Savioring
depthTraversalB(hierarchy, 0);
function depthTraversalB(node, depth) {
for (let i = 0; i < node.length; i++) {
Expand Down Expand Up @@ -1156,6 +1174,8 @@ const compile = function (req, res, callback) {
let intent = node.intent;
let props = JSON.parse(node.feature.properties);

if (excludeIntents.includes(intent)) continue;

//Check for duplicate uuids
if (props.uuid == null) {
issues.push({
Expand Down Expand Up @@ -1478,7 +1498,7 @@ router.post("/publish", function (req, res, next) {
logger("error", "Failed to publish. " + message, req.originalUrl, req);
res.send({
status: "failure",
message: "Failed to publish." + message,
message: "Failed to publish. " + message,
body: {},
});
}
Expand All @@ -1493,19 +1513,17 @@ router.post("/publish", function (req, res, next) {
failureCallback
) {
Table.findAll({
limit: 1,
where: {
file_id: file_id,
},
order: [["history_id", "DESC"]],
})
.then((histories) => {
let maxHistoryId = -Infinity;
if (histories && histories.length > 0) {
for (let i = 0; i < histories.length; i++) {
maxHistoryId = Math.max(histories[i].history_id, maxHistoryId);
}
.then((lastHistory) => {
if (lastHistory && lastHistory.length > 0) {
return {
historyIndex: maxHistoryId + 1,
history: histories[maxHistoryId].history,
historyIndex: lastHistory[0].history_id + 1,
history: lastHistory[0].history,
};
} else return { historyIndex: 0, history: [] };
})
Expand Down Expand Up @@ -1580,7 +1598,14 @@ router.post("/publish", function (req, res, next) {
cb(true);
return null;
})
.catch(function (error) {
.catch(function (err) {
logger(
"error",
"Error adding to published.",
req.originalUrl,
req,
err
);
cb(false);
return null;
});
Expand Down
11 changes: 6 additions & 5 deletions API/Backend/Draw/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const routerDraw = require("./routes/draw").router;

let setup = {
//Once the app initializes
onceInit: s => {
onceInit: (s) => {
s.app.use(
"/API/files",
s.ensureUser(),
Expand All @@ -24,17 +24,18 @@ let setup = {
);
},
//Once the server starts
onceStarted: s => {},
onceStarted: (s) => {},
//Once all tables sync
onceSynced: s => {
onceSynced: (s) => {
routeFiles.makeMasterFiles([
"roi",
"campaign",
"campsite",
"trail",
"signpost"
"signpost",
"all",
]);
}
},
};

module.exports = setup;
Loading