[R-sig-Geo] projecting shape files, in R?

Michael Sumner mdsumner at gmail.com
Mon Oct 6 21:01:23 CEST 2014


All this information is relevant and belongs in the thread. Please stay
on-list.

Showing us the map would help someone help you. With the actual coordinates
some one could even have a stab at guessing. This is no more doable in
ArcGis than any other program - the history and clues are all that matters.

Cheers, Mike
On 7 Oct 2014 00:42, "Alessandra Carioli" <alessandracarioli at gmail.com>
wrote:

> Thanks for your answers. Mine was a general question with a more
> particular need behind, more into detail I am dealing with a map of Spain
> with ‘custom made’ polygons, where I have 910 centroids with some
> coordinates in a unit that should be meters. I say should be because it
> looks like meters, I’ve calculated distances between cities and it makes
> sense, but I have no absolute proof (no ‘read me’ note with “distances are
> in meters").
> My centroids are cities and I know all of them.
> Of course if I googled the name of each and every city I would know the
> exact latitude and longitude, but I want to have that information in a prj
> file (plus googling 910 times and creating long-lat vectors is time
> consuming) so that my map would be in a mercator style, while right now is
> in a
>
> I know this can be done in Arcgis but I'd like to be R-sufficient.
>
> If I had the .prj file this would not be an issue, but I don’t.
>
>
> Message: 1
> Date: Fri, 3 Oct 2014 13:32:39 +0200
> From: Alessandra Carioli <alessandracarioli at gmail.com>
> To: r-sig-geo at r-project.org
> Subject: [R-sig-Geo] projecting shape files, in R?
> Message-ID: <0A114832-F81A-4B1D-8B9C-8F26DBF3C686 at gmail.com>
> Content-Type: text/plain; charset=windows-1252
>
> Dear Mailing list members,
>
> I need a projected shape file but I don?t have the .prj information and I
> was wondering if anything like projecting a shape file to obtain
> coordinates in longitude and latitude can be done. My issue is that I am
> producing semivariograms and, although I think distances are in meters, I
> want to be 100% sure. Also, being the considered area rather big (Europe)
> considering the projected coordinated would make my computation more
> precise.
>
> Any ideas?
>
> Ale
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 3 Oct 2014 13:54:16 +0200
> From: Janka Vanschoenwinkel <janka.vanschoenwinkel at uhasselt.be>
> To: Alessandra Carioli <alessandracarioli at gmail.com>
> Cc: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org>
> Subject: Re: [R-sig-Geo] projecting shape files, in R?
> Message-ID:
> <CAHymutJEhjpZZyh_vMCF12LdqPwv9VXgMtyBj-wzSPREn-kV8w at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Dear Alessandra,
>
> I am still relatively new in using R, but I can make my .prj files myself.
> By using the following command, I can make a shapefile with the information
> I already uploaded. It gives me the .dbf, .prj, .shp and .shx files.
>
>
> writeOGR(data, dsn = ".", layer ='choose name', driver = 'ESRI Shapefile')
>
>
> You didn't give a lot of information so I don't know exactly if this line
> is also applicable to your case. I think it depends on your data, but maybe
> somebody more experienced can give additional or other advice. Or you can
> look up the code line I wrote in the help box!
>
> Good luck!
>
> Janka
>
>
> 2014-10-03 13:32 GMT+02:00 Alessandra Carioli <alessandracarioli at gmail.com
> >:
>
> Dear Mailing list members,
>
> I need a projected shape file but I don?t have the .prj information and I
> was wondering if anything like projecting a shape file to obtain
> coordinates in longitude and latitude can be done. My issue is that I am
> producing semivariograms and, although I think distances are in meters, I
> want to be 100% sure. Also, being the considered area rather big (Europe)
> considering the projected coordinated would make my computation more
> precise.
>
> Any ideas?
>
> Ale
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 3 Oct 2014 22:09:49 +1000
> From: Michael Sumner <mdsumner at gmail.com>
> To: Alessandra Carioli <alessandracarioli at gmail.com>
> Cc: RsigGeo <r-sig-geo at r-project.org>
> Subject: Re: [R-sig-Geo] projecting shape files, in R?
> Message-ID:
> <CAAcGz9-8AfMyCat3Z6XkYB0kz+-kx3iaWFa8mCdokqC6RbLu+w at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> It's not really possible to guess from a literally infinite number of
> possible projections. Usually there is some information, or you can
> infer it from context. Really you need at least the family of the
> projection, then you can maybe guess at the details until you find a
> good match. Experience can provide the family by looking at the data,
> but only careful hunting can find the details. It's important to find
> and tell the story of what the data are, clues are hidden in many
> ways.
>
> For example, this map was fairly simple to work out (for me, given my
> background, the people I know, the stuff I've seen 'around here'):
>
> http://www.bom.gov.au/ant/seaice/
>
> Through experience I know that 71 S is a commonly used latitude for
> the "true scale" of a Polar Stereographic projection, and that Polar
> Stereographic (the family) is pretty popular for Antarctic data. (It's
> because the coast of Antarctica is roughly "averagely" at 70S, and
> secant-slicing the ellipsoid at this latitude provides a better fit
> for areas around the coast, a good compromise compared to the single
> tangent at the south pole). But, perspective on this aspect of PS is
> relatively new for me. The rest was easy, I can find two points with
> the printed graticule, and also determine the central longitude at
> 110E and so with tools to transform longlat to PS I can fully
> georeference this image - well good enough that I cannot see a
> problem. I cannot see any of this metadata on the web page, so I had
> to resort to personal experience and socio-historical heuristics. (I'm
> still not sure if this uses WGS84, a sphere, or maybe Hughes 1980 - I
> have to do some more tests to be sure, but maybe it's not answerable
> or maybe doesn't even matter).
>
> So, you need to go hunting in your own social context, show us the
> map, give us more clues. It's possible to guess/get lucky, but you
> really need to find out all the details. Guessing from nothing is a
> no-hope. There are some CRS that won't be candidates given the range
> though, for example it's unlikely that for all of Europe that UTM is
> used so you need some idea about the sensible scope for different
> families - clues in one direction - as well as knowledge about the
> data, what it's used for, and so on - from the other direction.
>
> Cheers, Mike.
>
>
>
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list