[R] LAT/LON to UTM in R

Adams, Jean jvadams at usgs.gov
Wed Nov 19 23:47:23 CET 2014


Those do look different.  I called that data frame "arc", and ran this code
to look at all three versions of the coordinates.

par(mfrow=c(2, 2))
map("world", type="n", xlim=range(xy$X), ylim=range(xy$Y), mar=c(1, 1, 2,
points(xy[, c("X", "Y")])
mtext("xy lat long", side=3, font=2, line=1)
plot(utm, xlab="", ylab="", main="xy utm", axes=FALSE)
plot(arc, xlab="", ylab="", main="arc utm", axes=FALSE)


On Wed, Nov 19, 2014 at 12:20 PM, Zilefac Elvis <zilefacelvis at yahoo.com>

> Hi Adam,
> I was not sure if my solution was correct.
> This is what I got using ArcGIS to convert the same coordinates:
> +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0
> +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"
> structure(list(Long = c(662843L, 303344L, 634922L, 634177L, 310679L,
> 494213L, 426481L, 629459L, 640032L, 481274L, 712879L, 341099L,
> 514207L, 567047L, 459277L, 575434L, 709183L, 552371L, 309914L,
> 661364L, 347328L, 362256L, 627057L, 493059L, 486510L, 556726L,
> 463097L, 576453L, 371836L, 667253L, 462589L, 482793L, 642357L,
> 614686L, 438047L, 314744L, 393704L, 373215L, 570837L, 469155L,
> 485882L, 538672L, 475748L, 334217L, 691256L, 525404L, 382909L,
> 307134L, 431634L, 647819L, 294333L, 595640L, 587238L, 626271L,
> 650049L, 605478L, 709453L, 526955L, 460853L, 309177L, 566596L,
> 685513L, 357648L, 574174L, 489798L, 455265L, 523438L, 382373L,
> 647731L, 305459L, 693516L, 293105L, 607049L, 429728L, 399064L,
> 558985L, 354402L, 431804L, 452858L, 334572L, 353150L, 347255L,
> 309997L, 651587L, 377949L, 546719L, 328154L, 495398L, 544308L,
> 404778L, 380285L, 472101L, 451486L, 689300L, 641007L, 323389L,
> 579680L, 660968L, 624387L, 601305L, 704301L, 708545L, 325927L,
> 304077L, 681973L, 370117L, 536414L, 355787L, 686312L, 464761L,
> 430765L, 313128L, 370015L, 520058L, 308146L, 700041L, 284328L,
> 641445L, 382795L, 419101L), Lat = c(5861664L, 5773823L, 5643796L,
> 5801793L, 5656630L, 5488602L, 5661469L, 5428965L, 5610551L, 5888993L,
> 5595190L, 5498706L, 5585348L, 5447873L, 5555464L, 5980796L, 5562753L,
> 5533326L, 5432936L, 5488765L, 5776730L, 5982225L, 5531237L, 6514448L,
> 6278448L, 6471427L, 6401046L, 6449487L, 6358353L, 6156961L, 6345385L,
> 6111516L, 6606224L, 6233217L, 6510482L, 6073002L, 6246362L, 6304842L,
> 6184398L, 5768919L, 5618707L, 5440930L, 5714384L, 5510039L, 5642229L,
> 5469758L, 5592190L, 5711317L, 5680306L, 5453896L, 5651687L, 5600655L,
> 5678368L, 5709223L, 5505129L, 5639776L, 5500421L, 5852322L, 5575467L,
> 5556498L, 5909447L, 5850231L, 5705197L, 5759364L, 5807763L, 5896953L,
> 5586493L, 5781340L, 5804407L, 5572216L, 5675712L, 5472494L, 5887928L,
> 5975151L, 5428373L, 5518940L, 5588450L, 5530168L, 5474349L, 5449946L,
> 6066019L, 6119675L, 5907208L, 6000473L, 5877156L, 6030491L, 5910972L,
> 5970172L, 6141752L, 6216038L, 6116434L, 6231769L, 5919241L, 5974015L,
> 6128195L, 6206356L, 6000898L, 6190147L, 5990754L, 5673065L, 5483528L,
> 5667392L, 5430185L, 5534421L, 5500543L, 5703751L, 5936934L, 5638482L,
> 5603087L, 5916899L, 5864980L, 5814647L, 5499049L, 5540892L, 5445238L,
> 5740548L, 5489532L, 5809788L, 5799135L, 5544801L)), .Names = c("Long",
> "Lat"), class = "data.frame", row.names = c(NA, -120L))
> Is there any difference between these points and those converted in R?
> Tahnks,
> Zilefac

	[[alternative HTML version deleted]]

More information about the R-help mailing list