map-projections

How to change a Lambert Conic Conformal raster projection to latlon degree R

北战南征 提交于 2019-12-01 22:39:47
I have a raster, obtained from a netcdf which is in (Lambert Conic Conformal projection): library(meteoForecast) wrf_temporary <- getRaster("temp", day = Sys.Date(), frames = 'complete', resolution = 36, service = "meteogalicia") wrf_temporary extent : -18, 4230, -18, 3726 (xmin, xmax, ymin, ymax) coord. ref. : +proj=lcc +lat_1=43 +lat_2=43 +lat_0=34.82300186157227 +lon_0=-14.10000038146973 +x_0=536402.34 +y_0=-18558.61 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=km +no_defs Now I want to transform that wrf_temporary raster to "+proj=longlat +datum=WGS84" (lat long degree). What to do? I want

d3 world map with country click and zoom almost working not quite

▼魔方 西西 提交于 2019-12-01 09:24:54
I am working on a world map that features a click to zoom feature. When clicking a country the map zooms in but the country is not always centered -- the same happens when you click out and repeat, it never seems to deliver the same result. Note: If you disable the transition function, the zoom and centering does work, only when rotation is added it displays incorrectly. What is wrong with my code? I created a plunker for convenience http://plnkr.co/edit/tgIHG76bM3cbBLktjTX0?p=preview <!DOCTYPE html> <meta charset="utf-8"> <style> .background { fill: none; pointer-events: all; stroke:grey; }

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 fix map boundaries on d3 cartographic raster reprojection?

邮差的信 提交于 2019-11-29 20:29:16
问题 I try to use the raster reprojection of a map following this example. If I change the example kavrayskiy7 projection by the Azimuthal Equidistant projection, var projection = d3.geo.azimuthalEquidistant() .scale(90) .translate([width / 2, height / 2]) .clipAngle(180 - 1e-3) .precision(.1); it should project the Earth onto a disc (the image of the projection map). However, the raster reprojection goes beyond that disc and fills the entire canvas with an extended picture (the inverse projection

Which segment of a polyline was clicked?

大城市里の小女人 提交于 2019-11-29 08:58:37
I have set up a sample polyline with five segments , and I'm allowing new markers to be created when the user clicks on the polyline. I'd like to know if there's a foolproof way to determine whether the new marker is between markers 0 and 1, or 1 and 2 ... or between 4 and 5. I've considered checking if the new marker is inside a bounding box, and point-in-line formulas, but neither is 100% precise. As Google Maps uses Mercator Projection for projecting GPS coordinates, you can't use 'line equation' for gps coordinates, because projection is not linear for gps points.But instead you can use

Java - Hibernate criteria.setResultTransformer() initializes model fields with default values

北城余情 提交于 2019-11-28 23:30:46
I am new to Hibernate and I am trying to get some data from the database. I don't want to get the full data but a projection of an entity. The thing is that in the for-loop when I get the id and the name of my projection, it gets the default values id=0 and name=null instead of id=7 and name="Name 8" which are the records of the original entity in the database. Do you know what causes this problem? The for-loop is in the last code. Here is the Student Entity @Entity(name = "Students") public class Student { @Id @GeneratedValue @Column(name = "StudentId") private int id; @Column(name = "Name",

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

Android: How To: mark the current location into a map (still image) - SOURCE CODE,TESTCASE,ACTUAL,EXPECTED OUTPUT ADDED

旧城冷巷雨未停 提交于 2019-11-28 12:37:53
问题 I have created another question (How to display a map (still image file) with a moving current location) But it contains 2 (two) questions, so i need to segregate it. I am trying to create a prototype that could guide a person to his destination place. place is a wide building with several floors. i can obtain/retrieve the maps (still images). e.g. current:1F destination:5F; so I can get the still images of 1st,2nd...5th floors (5 image files). Scenario: start the application input the

Which segment of a polyline was clicked?

≡放荡痞女 提交于 2019-11-28 02:21:35
问题 I have set up a sample polyline with five segments, and I'm allowing new markers to be created when the user clicks on the polyline. I'd like to know if there's a foolproof way to determine whether the new marker is between markers 0 and 1, or 1 and 2 ... or between 4 and 5. I've considered checking if the new marker is inside a bounding box, and point-in-line formulas, but neither is 100% precise. 回答1: As Google Maps uses Mercator Projection for projecting GPS coordinates, you can't use

Java - Hibernate criteria.setResultTransformer() initializes model fields with default values

守給你的承諾、 提交于 2019-11-27 14:49:24
问题 I am new to Hibernate and I am trying to get some data from the database. I don't want to get the full data but a projection of an entity. The thing is that in the for-loop when I get the id and the name of my projection, it gets the default values id=0 and name=null instead of id=7 and name="Name 8" which are the records of the original entity in the database. Do you know what causes this problem? The for-loop is in the last code. Here is the Student Entity @Entity(name = "Students") public