Scaling x,y coordinates in proj4? The Next CEO of Stack Overflowproj4 cookbook?Mapping x, y...

What flight has the highest ratio of time difference to flight time?

Why the difference in type-inference over the as-pattern in two similar function definitions?

How to place nodes around a circle from some initial angle?

Is it possible to replace duplicates of a character with one character using tr

Would a completely good Muggle be able to use a wand?

Why does standard notation not preserve intervals (visually)

Can MTA send mail via a relay without being told so?

Why didn't Khan get resurrected in the Genesis Explosion?

Easy to Read Palindrome Checker

Need help understanding a power circuit (caps and diodes)

Why is information "lost" when it got into a black hole?

Is it okay to majorly distort historical facts while writing a fiction story?

What was the first Unix version to run on a microcomputer?

Reference request: Grassmannian and Plucker coordinates in type B, C, D

Should I tutor a student who I know has cheated on their homework?

Is wanting to ask what to write an indication that you need to change your story?

Decomposition of product of two Plucker coordinates

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

Why this way of making earth uninhabitable in Interstellar?

The exact meaning of 'Mom made me a sandwich'

Beveled cylinder cutout

Is there a way to save my career from absolute disaster?

How to count occurrences of text in a file?

What did we know about the Kessel run before the prologues?



Scaling x,y coordinates in proj4?



The Next CEO of Stack Overflowproj4 cookbook?Mapping x, y pixel coordinates to latitude and longitudes on the WGS84 datumProj4 inconsistent longitude after projectionDrawing on jpg-map image with proj4 (perl)PyProj/Proj4 convert geographic to projected coordinates for Geostationary DataCreating custom projections with Proj4Braun/Gall projection and pixel conversionWarping raster to new domain/resolution/projection causes data lossCreating Proj4 string for local coordinatesAre proj4 strings case sensitive?












0















This question was asked before on Stack Overflow.



Let's say we have mercator map with given resolution (for simplicity in centimeters).



Now let's get coordinates of (lat,lon) = (50, 15):



$ proj +proj=merc +ellps=WGS84
50 15
5565974.54 1678147.52


Since we don't know the boundaries, we can't scale it to desired resolution.



The only way I've found to get boundaries is compute the coordinates for (lat, lon) = (180, 0) and (0, 90), but that's more like a hack and it's not universal (other projections might map only from (±90, ±90)).



Does proj4 deal with scaling differently?










share|improve this question

























  • I am confused as to what you are really asking, but from your response to Mintx's answer below, perhaps this post will help with the transformation misunderstanding: stackoverflow.com/questions/2651099/… The accepted answer has a very good breakdown of going from Lat Lon to pixels via Web Mercator.

    – evv_gis
    Mar 21 '14 at 13:26
















0















This question was asked before on Stack Overflow.



Let's say we have mercator map with given resolution (for simplicity in centimeters).



Now let's get coordinates of (lat,lon) = (50, 15):



$ proj +proj=merc +ellps=WGS84
50 15
5565974.54 1678147.52


Since we don't know the boundaries, we can't scale it to desired resolution.



The only way I've found to get boundaries is compute the coordinates for (lat, lon) = (180, 0) and (0, 90), but that's more like a hack and it's not universal (other projections might map only from (±90, ±90)).



Does proj4 deal with scaling differently?










share|improve this question

























  • I am confused as to what you are really asking, but from your response to Mintx's answer below, perhaps this post will help with the transformation misunderstanding: stackoverflow.com/questions/2651099/… The accepted answer has a very good breakdown of going from Lat Lon to pixels via Web Mercator.

    – evv_gis
    Mar 21 '14 at 13:26














0












0








0








This question was asked before on Stack Overflow.



Let's say we have mercator map with given resolution (for simplicity in centimeters).



Now let's get coordinates of (lat,lon) = (50, 15):



$ proj +proj=merc +ellps=WGS84
50 15
5565974.54 1678147.52


Since we don't know the boundaries, we can't scale it to desired resolution.



The only way I've found to get boundaries is compute the coordinates for (lat, lon) = (180, 0) and (0, 90), but that's more like a hack and it's not universal (other projections might map only from (±90, ±90)).



Does proj4 deal with scaling differently?










share|improve this question
















This question was asked before on Stack Overflow.



Let's say we have mercator map with given resolution (for simplicity in centimeters).



Now let's get coordinates of (lat,lon) = (50, 15):



$ proj +proj=merc +ellps=WGS84
50 15
5565974.54 1678147.52


Since we don't know the boundaries, we can't scale it to desired resolution.



The only way I've found to get boundaries is compute the coordinates for (lat, lon) = (180, 0) and (0, 90), but that's more like a hack and it's not universal (other projections might map only from (±90, ±90)).



Does proj4 deal with scaling differently?







coordinate-system coordinates proj






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 mins ago









PolyGeo

53.8k1781245




53.8k1781245










asked Mar 20 '14 at 20:53









RobertRobert

11




11













  • I am confused as to what you are really asking, but from your response to Mintx's answer below, perhaps this post will help with the transformation misunderstanding: stackoverflow.com/questions/2651099/… The accepted answer has a very good breakdown of going from Lat Lon to pixels via Web Mercator.

    – evv_gis
    Mar 21 '14 at 13:26



















  • I am confused as to what you are really asking, but from your response to Mintx's answer below, perhaps this post will help with the transformation misunderstanding: stackoverflow.com/questions/2651099/… The accepted answer has a very good breakdown of going from Lat Lon to pixels via Web Mercator.

    – evv_gis
    Mar 21 '14 at 13:26

















I am confused as to what you are really asking, but from your response to Mintx's answer below, perhaps this post will help with the transformation misunderstanding: stackoverflow.com/questions/2651099/… The accepted answer has a very good breakdown of going from Lat Lon to pixels via Web Mercator.

– evv_gis
Mar 21 '14 at 13:26





I am confused as to what you are really asking, but from your response to Mintx's answer below, perhaps this post will help with the transformation misunderstanding: stackoverflow.com/questions/2651099/… The accepted answer has a very good breakdown of going from Lat Lon to pixels via Web Mercator.

– evv_gis
Mar 21 '14 at 13:26










1 Answer
1






active

oldest

votes


















3














I think you may be confusing Mercator XY with the image pixel XY.



The Mercator XYs you are seeing in proj4 are derived from the Mercator formula where the intersection of the Equator and Prime Meridian is 0,0. Those Mercator XYs have nothing to do with the scale of your map.



If you're looking to convert lat/longs to the XY pixel location of an image, see the answer to this question here.






share|improve this answer


























  • I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

    – Robert
    Mar 21 '14 at 0:57






  • 1





    Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

    – Mintx
    Mar 24 '14 at 23:58














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f90393%2fscaling-x-y-coordinates-in-proj4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














I think you may be confusing Mercator XY with the image pixel XY.



The Mercator XYs you are seeing in proj4 are derived from the Mercator formula where the intersection of the Equator and Prime Meridian is 0,0. Those Mercator XYs have nothing to do with the scale of your map.



If you're looking to convert lat/longs to the XY pixel location of an image, see the answer to this question here.






share|improve this answer


























  • I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

    – Robert
    Mar 21 '14 at 0:57






  • 1





    Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

    – Mintx
    Mar 24 '14 at 23:58


















3














I think you may be confusing Mercator XY with the image pixel XY.



The Mercator XYs you are seeing in proj4 are derived from the Mercator formula where the intersection of the Equator and Prime Meridian is 0,0. Those Mercator XYs have nothing to do with the scale of your map.



If you're looking to convert lat/longs to the XY pixel location of an image, see the answer to this question here.






share|improve this answer


























  • I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

    – Robert
    Mar 21 '14 at 0:57






  • 1





    Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

    – Mintx
    Mar 24 '14 at 23:58
















3












3








3







I think you may be confusing Mercator XY with the image pixel XY.



The Mercator XYs you are seeing in proj4 are derived from the Mercator formula where the intersection of the Equator and Prime Meridian is 0,0. Those Mercator XYs have nothing to do with the scale of your map.



If you're looking to convert lat/longs to the XY pixel location of an image, see the answer to this question here.






share|improve this answer















I think you may be confusing Mercator XY with the image pixel XY.



The Mercator XYs you are seeing in proj4 are derived from the Mercator formula where the intersection of the Equator and Prime Meridian is 0,0. Those Mercator XYs have nothing to do with the scale of your map.



If you're looking to convert lat/longs to the XY pixel location of an image, see the answer to this question here.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 '17 at 12:39









Community

1




1










answered Mar 20 '14 at 21:57









MintxMintx

4,9621425




4,9621425













  • I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

    – Robert
    Mar 21 '14 at 0:57






  • 1





    Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

    – Mintx
    Mar 24 '14 at 23:58





















  • I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

    – Robert
    Mar 21 '14 at 0:57






  • 1





    Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

    – Mintx
    Mar 24 '14 at 23:58



















I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

– Robert
Mar 21 '14 at 0:57





I think i'm not confusing them, I want to know how to convert between them! Because mercator is rectangular, there must be some linear transformation from coordinates in mercator and image raster with given resolution. Something like (x,y) = (x0 * scaleX + width/2, y0 * scaleY + height/2).

– Robert
Mar 21 '14 at 0:57




1




1





Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

– Mintx
Mar 24 '14 at 23:58







Mercator is rectangular, but the UOM isn't consistent across the map. X and Y distance increases as you get closer to the poles. (That's why Greenland looks like it's the size of Africa but it's actually about 1/3 the size of Australia) Edited my answer to point to the formula you may be looking for.

– Mintx
Mar 24 '14 at 23:58




















draft saved

draft discarded




















































Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f90393%2fscaling-x-y-coordinates-in-proj4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

(145452) 2005 RN43 Классификация | Примечания | Ссылки |...

Щит и меч (фильм) Содержание Названия серий | Сюжет |...

Энтрерриос (город) Содержание История | Географическое...