Easy way in PyQGIS to convert a distance from meters to coordinates?Batch convert ipaddress to...

How is it possible for both the likelihood and log-likelihood to be asymptotically normal?

How do I append a character to the end of every line in an Excel cell?

Increment each digit in a number to form a new number

How would an AI self awareness kill switch work?

Why was Lupin comfortable with saying Voldemort's name?

Cookies - Should the toggles be on?

Why are the books in the Game of Thrones citadel library shelved spine inwards?

Am I a Rude Number?

Removing disk while game is suspended

How can a school be getting an epidemic of whooping cough if most of the students are vaccinated?

Why do cars have plastic shrouds over the engine?

Use two 8s and two 3s to make the number 24

Mathematics and the art of linearizing the circle

What are "industrial chops"?

Why do neural networks need so many training examples to perform?

Eww, those bytes are gross

Why avoid shared user accounts?

What would the chemical name be for C13H8Cl3NO

How can I get my players to come to the game session after agreeing to a date?

Is a new Boolean field better than a null reference when a value can be meaningfully absent?

Why zero tolerance on nudity in space?

Why is Agricola named as such?

Can we harness gravitational potential energy?

Does every functor from Set to Set preserve products?



Easy way in PyQGIS to convert a distance from meters to coordinates?


Batch convert ipaddress to coordinatesConvert an area to meters² in PostGISHow to convert UTM coordinates into Decimal Degree coordinates?Is there a way to convert GeoTIFF to DEM?convert lat/lon into metersConvert maps from different coordinates scale in Cartesian coordinate systemPyQgis convert screen to map coordinatesConvert DEM elevation points from centimeters to metersHow to convert latitude and longitude to x y coordinates (in meters)Convert Geometry.boundingbox() coordinates to geometry pyqgis













0















I am attempting to clip DEM rasters (USGS, in WGS 84) into a set of tiles measuring 2.56km on a side, in QGIS, using python.



So far, it appears that gdal_translate is working for me, using a bounding box in latitude/longitude coordinates. My problem is that I need to know how to convert 2.56 km into the equivalent distance in latitude and longitude. Thus far I've been getting by in other applications using the following formula, found online here: http://fmepedia.safe.com/articles/How_To/Calculating-accurate-length-in-meters-for-lat-long-coordinate-systems



rLat = math.radians(mapCenterLat)
metersPerDegreeLat = 111132.92 - 559.82 * math.cos(2 * rLat) + 1.175 * math.cos(4 * rLat)
metersPerDegreeLong = 111412.84 * math.cos(rLat) - 93.5 * math.cos(3 * rLat)
degreesPerMeterLong = 1.0 / metersPerDegreeLong
degreesPerMeterLat = 1.0 / metersPerDegreeLat


It's black magic, but it seems like it's worked for me so far. However, in this instance when I plug in that equation, and multiply my resulting degreesPerMeter numbers times 2560, the resulting rectangle ends up being more like 3.45 km wide by 2.49 km high.



Clearly there must be a better way in QGIS to figure this out, without resorting to black magic, right?



Also, at the risk of introducing an unrelated question: Can anyone tell me whether 1/3 Arc Second DEM files, which are listed as 10m height resolution, can be relied upon to have pixels exactly ten meters apart, in both directions? Or is that an approximation?



Many thanks!









share







New contributor




chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I am attempting to clip DEM rasters (USGS, in WGS 84) into a set of tiles measuring 2.56km on a side, in QGIS, using python.



    So far, it appears that gdal_translate is working for me, using a bounding box in latitude/longitude coordinates. My problem is that I need to know how to convert 2.56 km into the equivalent distance in latitude and longitude. Thus far I've been getting by in other applications using the following formula, found online here: http://fmepedia.safe.com/articles/How_To/Calculating-accurate-length-in-meters-for-lat-long-coordinate-systems



    rLat = math.radians(mapCenterLat)
    metersPerDegreeLat = 111132.92 - 559.82 * math.cos(2 * rLat) + 1.175 * math.cos(4 * rLat)
    metersPerDegreeLong = 111412.84 * math.cos(rLat) - 93.5 * math.cos(3 * rLat)
    degreesPerMeterLong = 1.0 / metersPerDegreeLong
    degreesPerMeterLat = 1.0 / metersPerDegreeLat


    It's black magic, but it seems like it's worked for me so far. However, in this instance when I plug in that equation, and multiply my resulting degreesPerMeter numbers times 2560, the resulting rectangle ends up being more like 3.45 km wide by 2.49 km high.



    Clearly there must be a better way in QGIS to figure this out, without resorting to black magic, right?



    Also, at the risk of introducing an unrelated question: Can anyone tell me whether 1/3 Arc Second DEM files, which are listed as 10m height resolution, can be relied upon to have pixels exactly ten meters apart, in both directions? Or is that an approximation?



    Many thanks!









    share







    New contributor




    chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I am attempting to clip DEM rasters (USGS, in WGS 84) into a set of tiles measuring 2.56km on a side, in QGIS, using python.



      So far, it appears that gdal_translate is working for me, using a bounding box in latitude/longitude coordinates. My problem is that I need to know how to convert 2.56 km into the equivalent distance in latitude and longitude. Thus far I've been getting by in other applications using the following formula, found online here: http://fmepedia.safe.com/articles/How_To/Calculating-accurate-length-in-meters-for-lat-long-coordinate-systems



      rLat = math.radians(mapCenterLat)
      metersPerDegreeLat = 111132.92 - 559.82 * math.cos(2 * rLat) + 1.175 * math.cos(4 * rLat)
      metersPerDegreeLong = 111412.84 * math.cos(rLat) - 93.5 * math.cos(3 * rLat)
      degreesPerMeterLong = 1.0 / metersPerDegreeLong
      degreesPerMeterLat = 1.0 / metersPerDegreeLat


      It's black magic, but it seems like it's worked for me so far. However, in this instance when I plug in that equation, and multiply my resulting degreesPerMeter numbers times 2560, the resulting rectangle ends up being more like 3.45 km wide by 2.49 km high.



      Clearly there must be a better way in QGIS to figure this out, without resorting to black magic, right?



      Also, at the risk of introducing an unrelated question: Can anyone tell me whether 1/3 Arc Second DEM files, which are listed as 10m height resolution, can be relied upon to have pixels exactly ten meters apart, in both directions? Or is that an approximation?



      Many thanks!









      share







      New contributor




      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am attempting to clip DEM rasters (USGS, in WGS 84) into a set of tiles measuring 2.56km on a side, in QGIS, using python.



      So far, it appears that gdal_translate is working for me, using a bounding box in latitude/longitude coordinates. My problem is that I need to know how to convert 2.56 km into the equivalent distance in latitude and longitude. Thus far I've been getting by in other applications using the following formula, found online here: http://fmepedia.safe.com/articles/How_To/Calculating-accurate-length-in-meters-for-lat-long-coordinate-systems



      rLat = math.radians(mapCenterLat)
      metersPerDegreeLat = 111132.92 - 559.82 * math.cos(2 * rLat) + 1.175 * math.cos(4 * rLat)
      metersPerDegreeLong = 111412.84 * math.cos(rLat) - 93.5 * math.cos(3 * rLat)
      degreesPerMeterLong = 1.0 / metersPerDegreeLong
      degreesPerMeterLat = 1.0 / metersPerDegreeLat


      It's black magic, but it seems like it's worked for me so far. However, in this instance when I plug in that equation, and multiply my resulting degreesPerMeter numbers times 2560, the resulting rectangle ends up being more like 3.45 km wide by 2.49 km high.



      Clearly there must be a better way in QGIS to figure this out, without resorting to black magic, right?



      Also, at the risk of introducing an unrelated question: Can anyone tell me whether 1/3 Arc Second DEM files, which are listed as 10m height resolution, can be relied upon to have pixels exactly ten meters apart, in both directions? Or is that an approximation?



      Many thanks!







      qgis dem convert





      share







      New contributor




      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 mins ago









      chriscalefchriscalef

      82




      82




      New contributor




      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      chriscalef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          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
          });


          }
          });






          chriscalef is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313837%2feasy-way-in-pyqgis-to-convert-a-distance-from-meters-to-coordinates%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          chriscalef is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          chriscalef is a new contributor. Be nice, and check out our Code of Conduct.













          chriscalef is a new contributor. Be nice, and check out our Code of Conduct.












          chriscalef is a new contributor. Be nice, and check out our Code of Conduct.
















          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%2f313837%2feasy-way-in-pyqgis-to-convert-a-distance-from-meters-to-coordinates%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

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

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...