-
Notifications
You must be signed in to change notification settings - Fork 437
GEOMESA-445 Create Temporal Density Iterator #346
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
GEOMESA-445 Create Temporal Density Iterator #346
Conversation
else if(isTemporalDensity){ | ||
val q1 = new Query(featureType.getTypeName) | ||
Iterator(DataUtilities.mixQueries(q1, query, "geomesa.mixed.query")) | ||
} else { | ||
splitQueryOnOrs(query, output) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A case statement here may be much cleaner, rather than the if/else logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having a hard time figuring out how to make this look best with a case statement because there are multiple booleans being checked.
So far I've come up with this style:
val a = (true/false)
val b = (true/false)
val queries = true match {
case a
=> "Do something"
case b
=> "Do something else"
case true => "Do default"
}
Is this any cleaner than the current state of code?
What I've seen so far looks nice. However I have not been able to look at TimeSnap nor the TemporalDensityIterator yet. |
val featureBuilder = AvroSimpleFeatureFactory.featureBuilder(returnSFT) | ||
featureBuilder.reset() | ||
featureBuilder.add(TemporalDensityIterator.encodeTimeSeries(summedTimeSeries)) | ||
featureBuilder.add(WKTUtils.read("Point(0 0)")) //BAD BAD BAD BAD BAD OKAY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny comments almost always require more length explanations. I assume this is done since you're dealing with only time information, yet need some kind of geometry for the Feature. If this is correct, please add a comment to this effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, use a static constant rather than calling WKTUtils.read each time.
…poralDensityIterator
Merged as 4965b42 on 1.5. |
No description provided.