Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vlkb-siav2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ViaLactea
vlkb-siav2
Commits
6f1fb86c
Commit
6f1fb86c
authored
1 year ago
by
Robert Butora
Browse files
Options
Downloads
Patches
Plain Diff
fixes overlap calc in SQL-query to use GALACTIC vs ICRS correctly
parent
450bc14c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
data-discovery/src/main/java/vlkb/search/DbPSearch.java
+43
-38
43 additions, 38 deletions
data-discovery/src/main/java/vlkb/search/DbPSearch.java
with
43 additions
and
38 deletions
data-discovery/src/main/java/vlkb/search/DbPSearch.java
+
43
−
38
View file @
6f1fb86c
...
@@ -75,8 +75,15 @@ public class DbPSearch
...
@@ -75,8 +75,15 @@ public class DbPSearch
}
}
String
theQuery
=
"SELECT obs_publisher_did FROM obscore WHERE ("
+
inputRegion
+
" && polygon_region_galactic)"
;
String
theQuery
;
if
(
coord
.
skySystem
.
equals
(
"GALACTIC"
))
{
theQuery
=
"SELECT obs_publisher_did FROM obscore WHERE ("
+
inputRegion
+
" && polygon_region_galactic)"
;
}
else
{
theQuery
=
"SELECT obs_publisher_did FROM obscore WHERE ("
+
inputRegion
+
" && polygon_region)"
;
}
if
(
vel_valid
)
if
(
vel_valid
)
{
{
...
@@ -196,18 +203,16 @@ public class DbPSearch
...
@@ -196,18 +203,16 @@ public class DbPSearch
String
commaSepPubdids
=
String
.
join
(
"\',\'"
,
pubdidArr
);
String
commaSepPubdids
=
String
.
join
(
"\',\'"
,
pubdidArr
);
String
theQuery
;
//String theQuery ="SELECT dataproduct_type,obs_publisher_did,obs_collection,polygon_region_galactic,access_url,em_min,em_max,"
//String theQuery ="SELECT dataproduct_type,obs_publisher_did,obs_collection,polygon_region_galactic,access_url,em_min,em_max,"
String
theQuery
;
// FIXME coord sys read from somwehere
if
(
coord
.
skySystem
.
equals
(
"GALACTIC"
))
if
(
true
)
{
{
// GALACTIC
theQuery
=
"SELECT *,"
theQuery
=
"SELECT *,"
+
inputRegion
+
" <@ polygon_region_galactic AS inputInsideDb, "
+
inputRegion
+
" <@ polygon_region_galactic AS inputInsideDb, "
+
inputRegion
+
" @> polygon_region_galactic AS dbInsideInput FROM obscore WHERE (obs_publisher_did IN (\'"
+
commaSepPubdids
+
"\'))"
;
+
inputRegion
+
" @> polygon_region_galactic AS dbInsideInput FROM obscore WHERE (obs_publisher_did IN (\'"
+
commaSepPubdids
+
"\'))"
;
}
}
else
else
{
// ICRS
{
theQuery
=
"SELECT *,"
theQuery
=
"SELECT *,"
+
inputRegion
+
" <@ polygon_region AS inputInsideDb, "
+
inputRegion
+
" <@ polygon_region AS inputInsideDb, "
+
inputRegion
+
" @> polygon_region AS dbInsideInput FROM obscore WHERE (obs_publisher_did IN (\'"
+
commaSepPubdids
+
"\'))"
;
+
inputRegion
+
" @> polygon_region AS dbInsideInput FROM obscore WHERE (obs_publisher_did IN (\'"
+
commaSepPubdids
+
"\'))"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment