Timeline for Calculating map scale in WGS84
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 22, 2023 at 21:07 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Sep 17, 2022 at 12:00 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 13, 2022 at 8:43 | answer | added | Paul | timeline score: 2 | |
May 11, 2022 at 10:14 | comment | added | Ian Turton | Add that as the answer | |
May 11, 2022 at 9:54 | comment | added | Paul | This did the trick! degrees = (mapRectangle.getMaxX() - mapRectangle.getMinX()); Map hints = new HashMap(); hints.put("dps", 96); double scale = RendererUtilities.calculateOGCScale(mapRectangle, canvasWidth, hints); | |
May 11, 2022 at 8:33 | comment | added | Paul | degrees = (mapRectangle.getMaxX() - mapRectangle.getMinX()); int screenWidthInPix = mapFrame.getMapPane().getBounds().width; scale = (double) screenWidthInpix/degrees; // where shall I use pixel size?? | |
May 11, 2022 at 7:58 | comment | added | Paul | How can I read out this scale? | |
May 11, 2022 at 7:39 | comment | added | Ian Turton | Geotools uses the OGC scale and pixel size of 96dpi, when you are using wgs84 the scale will be in pixels per degree so there will be no metres involved | |
May 11, 2022 at 7:28 | history | edited | Taras♦ | CC BY-SA 4.0 |
edited title
|
May 11, 2022 at 7:17 | history | edited | nmtoken |
edited tags
|
|
May 11, 2022 at 7:10 | history | asked | Paul | CC BY-SA 4.0 |