7:00 – 8:00 Research
- Got indexFromLocation() working. It took some fooling around with Excel. Here’s the method:
public int[] indexFromLocation(double[] loc){ int[] index = new int[loc.length]; for(int i = 0; i < loc.length; ++i){ double findex = loc[i]/mappingStep; double roundDown = Math.floor(findex); double roundUp = Math.ceil(findex); double lowdiff = findex - roundDown; double highdiff = roundUp - findex; if(lowdiff < highdiff){ index[i] = (int)roundDown; }else{ index[i] = (int)roundUp; } } return index; }
- And here are the much cleaner results:
- [0.00, 0.00] = [0, 0]
[0.00, 0.10] = [0, 0]
[0.00, 0.20] = [0, 1]
[0.00, 0.30] = [0, 1]
[0.00, 0.40] = [0, 2]
[0.00, 0.50] = [0, 2]
[0.00, 0.60] = [0, 2]
[0.00, 0.70] = [0, 3]
[0.00, 0.80] = [0, 3]
[0.00, 0.90] = [0, 4]
[0.00, 1.00] = [0, 4]
…
[1.00, 0.00] = [4, 0]
[1.00, 0.10] = [4, 0]
[1.00, 0.20] = [4, 1]
[1.00, 0.30] = [4, 1]
[1.00, 0.40] = [4, 2]
[1.00, 0.50] = [4, 2]
[1.00, 0.60] = [4, 2]
[1.00, 0.70] = [4, 3]
[1.00, 0.80] = [4, 3]
[1.00, 0.90] = [4, 4]
[1.00, 1.00] = [4, 4]
- [0.00, 0.00] = [0, 0]
- Another thought that struck me as far as the (int) constraint is that I can have a number of ArrayLists that are embedded in a an object that has the first and last index in it. These would be linked together to provide unconstrained (MAX_VALUE or 2,147,483,647 lists) storage
8:30 – 4:30 BRI
- I realized yesterday that the Ingest and Query microservices need to access the same GeoMesa Spring service. That keeps all the general store/query GeoMesa access code in one place, simplifies testing and allows for DI to provide the correct (hbase, accumulo, etc) implementation through a facade interface.
- Got tangled up with getting classpaths right and importing the proper libraries
- Got the maven files behaving, or at least not complaining on mvn clean and mvn compile!
- Well that’s a new error: Error: Could not create the Java Virtual Machine. I get that running the new installation with the geomesa-quickstart-hbase
- Ah, that’s what will happen when you paste your command-line arguments into the VM arguments space just above where it should go…
- Wednesday’s goal will to verify that HBaseQuickStart is running correctly in its new home and start to turn it into a service.
You must be logged in to post a comment.