Hi Simone - thank you very much for your reply. I'm trying to use facet data returned from Apache Solr Cloud to generate a heatmap. We have a large amount of geospatially tagged data within solr that we can use. The multi-int array is the data that comes back from Apache Solr Cloud. It is a 1024x1024 2d array where each cell contains the amount of data at 'that' geospatial location. I don't know what coordinate system Solr Cloud uses, and I'm pretty new to handling geospatial data. GeoTools has a process called HeatmapProcess that I was hoping to leverage. The capability from solr that I'm using is here: https://issues.apache.org/jira/browse/SOLR-7005
Thank you! -Joe On 7/21/2015 2:09 PM, Simone Giannecchini wrote: > 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 > <j...@lovehorsepower.com> 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 >> GeoTools-GT2-Users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ------------------------------------------------------------------------------ _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users