proj

lat/lon conversion to x/y-coordinates

一世执手 提交于 2019-12-08 07:44:32
问题 I have a openstreetmap image. left upper corner is lat: 80 lon: -169 and right lower corner is lat:-56 lon: 190 The image has the width: 2618 and the height: 1513 How do I convert given lat/lon-coordinates to the pictures x/y-coordinates? I tried it by myself, but couldn't figure out how to convert the coordinates. I hope someone can answer my question. 回答1: The question, as asked, is almost nonsensical. The area requested covers almost the entire globe, from 80N 169W to 56S 190E. That leaves

lat/lon conversion to x/y-coordinates

纵饮孤独 提交于 2019-12-06 15:05:01
I have a openstreetmap image. left upper corner is lat: 80 lon: -169 and right lower corner is lat:-56 lon: 190 The image has the width: 2618 and the height: 1513 How do I convert given lat/lon-coordinates to the pictures x/y-coordinates? I tried it by myself, but couldn't figure out how to convert the coordinates. I hope someone can answer my question. The question, as asked, is almost nonsensical. The area requested covers almost the entire globe, from 80N 169W to 56S 190E. That leaves out the band pole to pole from 170W to 169W, a disk around the north pole north of 80N, and a larger disk

How Can I Use (Ruby) RGeo to Transform (Unproject) Coordinates

假如想象 提交于 2019-12-05 02:24:37
问题 I started with How can I transform the coordinates of a Shapefile? . The response there started me on [what I think is] the right track, but I still haven't been able to solve my problem. One issue is that I haven't found the correct projection yet: https://gis.stackexchange.com/questions/13330/how-can-i-correctly-transform-unproject-from-lcc EDIT: That question on the gis site has been answered, and I was able to reproduce a correct transformation using the PROJ command line tool cs2cs. It

How to transform coordinate from WGS84 to a coordinate in a projection with PROJ.4?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 18:54:23
问题 I have a GPS-coordinate in WGS84 that I would like to transform to a map-projection coordinate in SWEREF99 TM using PROJ.4 in Java or Proj4js in JavaScript. Its hard to find documentation for PROJ.4 and how to use it. If you have a good link, please post it as a comment. The PROJ.4 parameters for SWEREF99 TM is +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs I have tried to use a PROJ.4 Java library for transforming Lat: 55° 00’ N, Long: 12° 45’ E and tried with this

Pandas error with basemap/proj for map plotting

与世无争的帅哥 提交于 2019-12-01 23:26:02
I ran the Python code below that is an example of "Plotting Maps: Visualizing Haiti Earthquake Crisis Data" on a book, Python for Data Analysis . Page 242-246 The code is supposed to create a plot map of Haiti but I got an error as below: Traceback (most recent call last): File "Haiti.py", line 74, in <module> x, y = m(cat_data.LONGITUDE, cat_data.LATITUDE) File "/usr/local/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 1148, in __call__ xout,yout = self.projtran(x,y,inverse=inverse) File "/usr/local/lib/python2.7/site-packages/mpl_toolkits/basemap/proj.py", line 286, in _

PHP Map projections

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 14:39:33
I have Googled myself to death.. I am attempting to write 2 php functions that will return X and Y from Lat and Long, in both Mercator and flat non-projected (grid) maps. Problem being every calculation I have ran across assumes your map(s) has the same lat and lon at the corners, and then the result is in meters. ugh Here is what I have .. maps of different sizes, different lat's, long's at the 4 corners. I downloaded the Proj4 php port, but with zero documentation and more code then I need, I was over whelmed ... HELP !! This presumes your lat/long coords are decimal values, and don't change

How to properly plot projected gridded data in ggplot2?

余生长醉 提交于 2019-11-29 21:02:13
I've been using using ggplot2 to plot climatic gridded data for years. These are usually projected NetCDF files. Cells are square in model coordinates, but depending on which projection the model uses, might not be so in the real world. My usual approach is to remap the data first on a suitable regular grid, and then plot. This introduces a small modification to the data, usually this is acceptable. However, I've decided this is not good enough anymore: I want to plot the projected data directly, without remapping, as other programs (e.g. ncl ) can, if I am not mistaken, do, without touching

How to properly plot projected gridded data in ggplot2?

别说谁变了你拦得住时间么 提交于 2019-11-28 17:13:17
问题 I've been using using ggplot2 to plot climatic gridded data for years. These are usually projected NetCDF files. Cells are square in model coordinates, but depending on which projection the model uses, might not be so in the real world. My usual approach is to remap the data first on a suitable regular grid, and then plot. This introduces a small modification to the data, usually this is acceptable. However, I've decided this is not good enough anymore: I want to plot the projected data