WGS84 is not a projected coordate system such as Web Mercator. Geographic coordinates are not shifted around using math formulas, they are in un-modified degrees, sort to speak.
Just make sure yur geo tiff is in the same projection as yur points. sent from 'droid On Jan 26, 2013 6:53 PM, "David Purdy" <[email protected]> wrote: > If projection information is only found in a .prj file then my GeoTiff > image does not have it. How do I go about getting that info?**** > > Also, I am not sure what you mean by "GPS points are not projected but are > in a geographic coordinate system such as WGS84"? **** > > ** ** > > I am basically doing the following to plot each point onto the map:**** > > ** ** > > *final* SimpleFeatureType point = createFeatureTypePoint();**** > > *final* SimpleFeatureBuilder BLDR = *new* SimpleFeatureBuilder(point);**** > > Coordinate coord = *new* Coordinate(gpsData.getLongitude().doubleValue(), > gpsData.getLatitude().doubleValue());**** > > pointCollection.add(createPoint(BLDR, coord, getPointId()));**** > > ** ** > > That createPoint method just uses GeometryFactory to create the point.**** > > ** ** > > Thanks,**** > > Dave**** > > ** ** > > *From:* Brian Behling [mailto:[email protected]] > *Sent:* Saturday, January 26, 2013 7:34 PM > *To:* David Purdy > *Cc:* [email protected] > *Subject:* Re: [Geotools-gt2-users] Coordinate Reference System is not > available issue...**** > > ** ** > > 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
