Note that there are some explanatory texts on larger screens.

plurals
  1. POConvert latitude/longitude to state plane coordinates
    primarykey
    data
    text
    <p>I've got a dataset with latitude and longitude which I'd like to convert to the state plane coordinates for Illinois East, using EPSG 2790 (<a href="http://spatialreference.org/ref/epsg/2790/" rel="nofollow noreferrer">http://spatialreference.org/ref/epsg/2790/</a>) or maybe ESRI 102672 (<a href="http://spatialreference.org/ref/esri/102672/" rel="nofollow noreferrer">http://spatialreference.org/ref/esri/102672/</a>).</p> <p>This has definitely been asked before; my code is based on the answers here (<a href="https://stackoverflow.com/questions/14880294/non-finite-transformation-detected-in-sptransform-in-rgdal-r-package">&quot;Non Finite Transformation Detected&quot; in spTransform in rgdal R Package</a> and <a href="http://r-sig-geo.2731867.n2.nabble.com/Converting-State-Plane-Coordinates-td5457204.html" rel="nofollow noreferrer">http://r-sig-geo.2731867.n2.nabble.com/Converting-State-Plane-Coordinates-td5457204.html</a>). </p> <p>But for some reason I can't get it to work:</p> <pre><code>library(rgdal) library(sp) data = data.frame(long=c(41.20,40.05), lat=c(-86.14,-88.15)) coordinates(data) &lt;- ~ long + lat proj4string(data) &lt;- CRS("+init=epsg:4326") # latitude/longitude data.proj &lt;- spTransform(data, CRS("+init=epsg:2790")) # illinois east </code></pre> <p>Gives:</p> <pre><code>non finite transformation detected: long lat 41.20 -86.14 Inf Inf Error in spTransform(data, CRS("+init=epsg:2790")) : failure in points 1 In addition: Warning message: In spTransform(data, CRS("+init=epsg:2790")) : 2 projected point(s) not finite </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload