Ciao Joseph,
please read below...

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility  for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.


On Mon, Jul 6, 2015 at 3:35 PM, Joseph Obernberger
<[email protected]> wrote:
> Hi - I'm very interested in using GeoTools HeatmapProcess to handle
> raster data from Apache Solr Cloud.  So far I've been able to generate
> views from the raster data using a GridCoverage2D,

what do you mean exactly

> but when I try to
> apply the heat map process, I get an empty frame.  Any tips?
>
> Thank you!
>
> -Joe
> ------------------------------------------------
> /**
>       * Create a new coverage from the given data array. All non-zero array
>       * values are written to the coverage as 1; zero values as 0.
>       */
>      public GridCoverage2D makeBinaryCoverage(int[][] data) {
>          GridCoverageFactory gcf
>                  = CoverageFactoryFinder.getGridCoverageFactory(null);
>
>          // Assume data array is in row-major order
>          final int dataW = data[0].length;
>          final int dataH = data.length;
>          final int imgTileW = 128;
>
>          // image tile sample model
>          SampleModel sm = new ComponentSampleModel(DataBuffer.TYPE_BYTE,
>                  imgTileW, imgTileW, 1, imgTileW, new int[]{0});
>
>          ColorModel cm = TiledImage.createColorModel(sm);
>
>          TiledImage img = new TiledImage(0, 0, dataW, dataH, 0, 0, sm, cm);
>          System.out.println("DataH: "+dataH+" dataW: "+dataW);
>
>          for (int y = 0; y < dataH; y++) {
>              for (int x = 0; x < dataW; x++) {
>                  if (data[y][x] != 0) {
>                      img.setSample(x, y, 0, data[y][x]);
>                  }
>              }
>          }
>
>          // Set world coords as 1:1 with image coords for this example
>          ReferencedEnvelope env = new ReferencedEnvelope(
>                  new Rectangle2D.Double(0, 0, dataW, dataH),
> DefaultEngineeringCRS.CARTESIAN_2D);
>          return gcf.create("HeatMap", img, env);
>      }


I am not sure what you are trying to do here (beware it's getting late
over here :) ).
What is this int multiarray you get as an input? What does it contain?

Aside from the fact that you are transporing the matrix as you turn
that into a TiledImage, I don't see anything problematic in this code.
I guess we need more info about what the problem is and what you are
trying to achieve with your code (see my question on the int matrix).


> ------------------------------------------------
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to