GeoMesa: saving raster data - geomesa

How can I save in GeoMesa raster data (GeoTIFF, DEM)? Can you please provide code examples? Also, please provide info (links) to the serialization of the raster data in Accumulo
I have only found the following commands line tool:
http://www.geomesa.org/documentation/user/accumulo/raster.html#ingest
http://www.geomesa.org/documentation/user/accumulo/commandline_tools.html#accumulo-tools-raster
http://www.geomesa.org/documentation/tutorials/geomesa-raster.html
Moreover, can I read that the image should be an image pyramid EPSG:4326 in order to ingest it. What will happen if it is not? Will I not be able to ingest it or the image will not be available in multiple zoom levels?

Since the GeoMesa raster module isn't heavily used, sadly there are few examples around writing data to Accumulo using it. That said, I believe you are looking for the 'putRaster' method here [1].
I believe the data must be pre-tiled to be ingested. If it is not pyramided, then only the one zoom level will be ingested. The benefit of the pyramid is for quicker downsampling; if that's not a concern, then no worries!
https://github.com/locationtech/geomesa/blob/master/geomesa-accumulo/geomesa-accumulo-raster/src/main/scala/org/locationtech/geomesa/raster/data/AccumuloRasterStore.scala#L193

Related

How to write a configuration file to tell the AllenNLP trainer to randomly split dataset into train and dev

The official document of AllenNLP suggests specifying "validation_data_path" in the configuration file, but what if one wants to construct a dataset from a single source and then randomly split it into train and validation datasets with a given ratio?
Does AllenNLP support this? I would greatly appreciate your comments.
AllenNLP does not have this functionality yet, but we are working on some stuff to get there.
In the meantime, here is how I did it for the VQAv2 reader: https://github.com/allenai/allennlp-models/blob/main/allennlp_models/vision/dataset_readers/vqav2.py#L354
This reader supports Python slicing syntax where you, for example, specify a data_path as "my_source_file[:1000]" to take the first 1000 instances from my_source_file. You can also supply multiple paths by setting data_path: ["file1", "file2[:1000]", "file3[1000-"]]. You can probably steal the top two blocks in that file (line 354 to 369) and put them into your own dataset reader to achieve the same result.

Mask R-CNN annotation tool

I’m new to deep learning and I was reading some state of art papers and I found that mask r-cnn is utterly used in segmentation and classification of images. I would like to apply it to my MSc project but I got some questions that you may be able to answer. I apologize if this isn’t the right place to do it.
First, I would like to know what are the best strategy to get the annotations. It seems kind of labor intensive and I’m not understanding if there is any easy way. Following that, I want to know if you know any annotation tool for mask r-cnn that generates the binary masks that are manually done by the user.
I hope this can turn into a productive and informative thread so any suggestion, experience would be highly appreciated.
Regards
You can use MASK-RCNN, I recommend it, is a two-stage framework, first you can scan the image and generate areas likely contain an object. And the second stage classifies the proposal drawing bounding boxes.
But the two-big question
how to train a model from scratch? And What happens when we want to
train our own dataset?
You can use annotations downloaded from the internet, or you can start creating your own annotations, this takes a lot of time!
You have tools like:
VIA GGC image annotator
http://www.robots.ox.ac.uk/~vgg/software/via/via_demo.html
it's online and you don't have to download any program. It is the one that I recommend you, save the images in a .json file, and so you can use the class of ballons that comes by default in SAMPLES in the framework MASK R-CNN, you would only have to put your json file and your images and to train your dataset.
But there are always more options, you have labellimg which is also used for annotation and is very well known but save the files in xml, you will have to make a few changes to your Class in python. You also have labelme, labelbox, etc.

Loading json file into titan graph database

I have given a task to load a json file into titandb with dynamodb as back end.Is there any java tutorial or if possible please upload java sample coding...
thanks.
Titan is an abstraction layer so whether you use Cassandra, dynamo, hbase, etc, you merely need to find Titan data loading instructions. They are a bit dated but you might want to start with these blog posts:
http://thinkaurelius.com/2014/05/29/powers-of-ten-part-i/
http://thinkaurelius.com/2014/06/02/powers-of-ten-part-ii/
The code examples work with an older version of Titan (the schema portion) but the concepts still apply.
You will find that the strategy for data loading with Titan has a lot to do with the size of your graph. You said you are loading "a JSON file" so I imagine you have a smaller graph in the millions of edges. In this case, a simple groovy script will likely suffice. Write a script to parse your JSON and write the data to the Titan.

Convert and add obj model to Web gl scene - without three.js

I want someone to tell me the steps to follow to convert an .obj object to json object so I can add it to my web gl scene like this : http://learningwebgl.com/blog/?p=1658
I ve tried everything. Python script, online converters etc. Every one has its flaws and I can't fix them.
I don't use the three.js lib.
Why can't you fix them?
There is no simple answer for how. The format for .obj is documented here. Read it, pull the data out you want in a format you design.
There's an infinite number of ways to convert it and an infinite number of ways to store the data. Maybe you'd like to read out the data and store the vertices in JavaScript arrays. Maybe you'd like to store them in binary which you download with XHR. Maybe you'd like to apply lossy compression to them so they download faster. Maybe you'd like to split the vertices when they reach some limit. Maybe you'd like to throw away texture coordinates because your app doesn't need them. Maybe you'd like to read higher order definitions and tessellate them into triangles. Maybe you'd like to read only some of the material parameters because you don't support all of them. Maybe you'd like to split the vertices by materials so you can more easily handle geometries with multiple materials. Maybe you'd like to reindex them so you can use gl.drawElements or maybe you'd like to flatten them so you can use gl.drawArrays.
The question you're asking is far too broad.

reading json objects in hadoop map reduce for processing data

iam a beginner in hadoop,can any one help me in reading json in mapreduce job.
i have googled and found jaql is suitable for reading json.but i didnot find any documentaion on how it could be implemented in our map reduce job.
is there any other framework which supports reading json in map reduce?
any suggestions on this?
Thanks in Advance
I would rather trust the MapReduce framework itself to handle this. MapReduce allows us to write custom Inout/Output Formats to handle data which is not supported by it OOTB, like JSON. See this question for an example. I would prefer this as I won't require any third party stuff for this. It's just a matter of extending the MapReduce API(But it's just my choice. Other's may find something else more suitable).
But, the easiest way, IMHO, would be to use Hive or Pig to handle JSON data. You don't have to do much in order to make it work, as both these project have OOTB JSON support. See this for Hive-JSON SerDe and this for Pig's JsonLoader and JsonStorage.
HTH