Does yur GeoTiff image have projection information? I think it may need a .prj file.
Typically GPS points are not projected but are in a geographic coordinate system such as WGS84. sent from 'droid On Jan 26, 2013 4:49 PM, "David Purdy" <[email protected]> wrote: > Hi All,**** > > ** ** > > I am working on an application that plots points from a GPS and has many > other features.**** > > My issue is that the points being plotted on the chart seems to be off by > a fairly decent amount. I would say somewhere in the order of 20 miles > south or so from the actual GPS coordinates. I do notice that I am getting > a warning displayed during reading of the TIFF image for the chart. The > warning is: "WARNING: Coordinate Reference is not available". Is this > warning the reason my plotted points are off from where they should be > displayed? Or would that be because of some other reason? I don't see > anywhere to define the coordinate reference system. I have poured over all > of your tutorials to see if I am missing something. In this case, I am > reading in 13001_3.tif and I also have a file named 13001_3.tfw in the same > directory where I am reading from. Below is the code I have for reading > the *.tif file:**** > > ** ** > > map = *new* MapContent();**** > > ** ** > > File rasterFile = *new* File(geoTiffFilesDir + "/" + selectedMapFile);**** > > String rasterFilePath = rasterFile.getPath();**** > > rasterFilePath = rasterFilePath.replace('\\', '/');**** > > AbstractGridFormat format = GridFormatFinder.*findFormat*( rasterFile );** > ** > > AbstractGridCoverage2DReader reader = format.getReader(rasterFile);**** > > **** > > StyleBuilder styleBuilder = *new* StyleBuilder();**** > > RasterSymbolizer rastSymbolizer = styleBuilder.createRasterSymbolizer();** > ** > > Style style = styleBuilder.createStyle(rastSymbolizer);**** > > GridReaderLayer rasterLayer = *new* GridReaderLayer(reader, style);**** > > map.layers().add(layerIndex, rasterLayer); **** > > ** ** > > I appreciate any help!!**** > > ** ** > > Thanks,**** > > Dave**** > > ** ** > > --------------------------------------------**** > > *David Purdy* > > *Owner/President* > > *JJM Technologies Corporation* > > *Email: [email protected]* > > *Phone: 508.972.1266* > > *[image: signatureLogo]* > > ** ** > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > GeoTools-GT2-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > >
<<image001.gif>>
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d
_______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
