asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Jacobs (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ASTERIXDB-1327) Spatial-intersect between point and circle not working correctly
Date Tue, 01 Mar 2016 20:05:18 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Steven Jacobs updated ASTERIXDB-1327:
-------------------------------------
    Description: 
The first query returns a large set of results. The second returns nothing

for $report in dataset EmergencyReports
for $location in dataset UserLocations
where $report.emergencyType = "earthquake"
let $circle := create-circle($location.location,.1)
where spatial-intersect($report.impactZone, $circle)
return {
	"user at":$location.location,
	"report at":$report.impactZone
}

for $report in dataset EmergencyReports
for $location in dataset UserLocations
where $report.emergencyType = "earthquake"
where spatial-intersect($report.impactZone, $location.location)
return {
	"user at":$location.location,
	"report at":$report.impactZone
}








Here are the DDL statements. I will attach the two datasets:
drop dataverse channels if exists;
create dataverse channels;
use dataverse channels;

create type UserLocation as closed {
	recordId: uuid,
	location: point,
	user-id: string,
	timeoffset: float
}


create type EmergencyReport as closed {
	reportId: uuid,
	severity: int,
	impactZone: circle,
	timeoffset: float,
	duration: float,
	message: string,
	emergencyType: string
}


create dataset UserLocations(UserLocation)
primary key recordId autogenerated;


create dataset EmergencyReports(EmergencyReport)
primary key reportId autogenerated;

load dataset UserLocations using localfs (("path"="asterix_nc1:///Users/stevenjacobs/Desktop/EmergencyDataset/UserLocationsShort.adm"),("format"="adm"));

load dataset EmergencyReports using localfs(("path"="asterix_nc1:///Users/stevenjacobs/Desktop/EmergencyDataset/EmergencyReports.adm"),("format"="adm"));

  was:
The first query returns a large set of results. The second returns nothing

for $report in dataset EmergencyReports
for $location in dataset UserLocations
where $report.emergencyType = "earthquake"
let $circle := create-circle($location.location,.1)
where spatial-intersect($report.impactZone, $circle)
return {
	"user at":$location.location,
	"report at":$report.impactZone
}

for $report in dataset EmergencyReports
for $location in dataset UserLocations
where $report.emergencyType = "earthquake"
where spatial-intersect($report.impactZone, $location.location)
return {
	"user at":$location.location,
	"report at":$report.impactZone
}


Here are the DDL statements. I will attach the two datasets:
drop dataverse channels if exists;
create dataverse channels;
use dataverse channels;

create type UserLocation as closed {
	recordId: uuid,
	location: point,
	user-id: string,
	timeoffset: float
}


create type EmergencyReport as closed {
	reportId: uuid,
	severity: int,
	impactZone: circle,
	timeoffset: float,
	duration: float,
	message: string,
	emergencyType: string
}


create dataset UserLocations(UserLocation)
primary key recordId autogenerated;


create dataset EmergencyReports(EmergencyReport)
primary key reportId autogenerated;

load dataset UserLocations using localfs (("path"="asterix_nc1:///Users/stevenjacobs/Desktop/EmergencyDataset/UserLocationsShort.adm"),("format"="adm"));

load dataset EmergencyReports using localfs(("path"="asterix_nc1:///Users/stevenjacobs/Desktop/EmergencyDataset/EmergencyReports.adm"),("format"="adm"));


> Spatial-intersect between point and circle not working correctly
> ----------------------------------------------------------------
>
>                 Key: ASTERIXDB-1327
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1327
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Steven Jacobs
>
> The first query returns a large set of results. The second returns nothing
> for $report in dataset EmergencyReports
> for $location in dataset UserLocations
> where $report.emergencyType = "earthquake"
> let $circle := create-circle($location.location,.1)
> where spatial-intersect($report.impactZone, $circle)
> return {
> 	"user at":$location.location,
> 	"report at":$report.impactZone
> }
> for $report in dataset EmergencyReports
> for $location in dataset UserLocations
> where $report.emergencyType = "earthquake"
> where spatial-intersect($report.impactZone, $location.location)
> return {
> 	"user at":$location.location,
> 	"report at":$report.impactZone
> }
> Here are the DDL statements. I will attach the two datasets:
> drop dataverse channels if exists;
> create dataverse channels;
> use dataverse channels;
> create type UserLocation as closed {
> 	recordId: uuid,
> 	location: point,
> 	user-id: string,
> 	timeoffset: float
> }
> create type EmergencyReport as closed {
> 	reportId: uuid,
> 	severity: int,
> 	impactZone: circle,
> 	timeoffset: float,
> 	duration: float,
> 	message: string,
> 	emergencyType: string
> }
> create dataset UserLocations(UserLocation)
> primary key recordId autogenerated;
> create dataset EmergencyReports(EmergencyReport)
> primary key reportId autogenerated;
> load dataset UserLocations using localfs (("path"="asterix_nc1:///Users/stevenjacobs/Desktop/EmergencyDataset/UserLocationsShort.adm"),("format"="adm"));
> load dataset EmergencyReports using localfs(("path"="asterix_nc1:///Users/stevenjacobs/Desktop/EmergencyDataset/EmergencyReports.adm"),("format"="adm"));



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message