Skip to content

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

Conversation

TheBrooks
Copy link

No description provided.

else if(isTemporalDensity){
val q1 = new Query(featureType.getTypeName)
Iterator(DataUtilities.mixQueries(q1, query, "geomesa.mixed.query"))
} else {
splitQueryOnOrs(query, output)
}
Copy link
Contributor

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.

Copy link
Author

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?

@ronq
Copy link
Contributor

ronq commented Nov 3, 2014

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
Copy link
Contributor

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.

Copy link
Contributor

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.

@jnh5y
Copy link
Contributor

jnh5y commented Nov 13, 2014

Merged as 4965b42 on 1.5.

@jnh5y jnh5y closed this Nov 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants