Why does DotSpatial return NaN for point reprojection? Planned maintenance scheduled April...

Is grep documentation wrong?

Is this homebrew Lady of Pain warlock patron balanced?

Can a new player join a group only when a new campaign starts?

Why are the trig functions versine, haversine, exsecant, etc, rarely used in modern mathematics?

How do pianists reach extremely loud dynamics?

Why are both D and D# fitting into my E minor key?

Amount of permutations on an NxNxN Rubik's Cube

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

An adverb for when you're not exaggerating

Do I really need recursive chmod to restrict access to a folder?

Can you use the Shield Master feat to shove someone before you make an attack by using a Readied action?

Is it fair for a professor to grade us on the possession of past papers?

Would "destroying" Wurmcoil Engine prevent its tokens from being created?

Why wasn't DOSKEY integrated with COMMAND.COM?

Dating a Former Employee

Around usage results

Do I really need to have a message in a novel to appeal to readers?

What do you call the main part of a joke?

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

Trademark violation for app?

Can a party unilaterally change candidates in preparation for a General election?

How come Sam didn't become Lord of Horn Hill?

How to compare two different files line by line in unix?

Closed form of recurrent arithmetic series summation



Why does DotSpatial return NaN for point reprojection?



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?CreateFeatureClass failure in vb.netOpen-source projects that use DotSpatial?Why does Find_SRID return zero?Creating Map Document for DotSpatial?Coordinate transformation/reprojection using DotSpatialerror: 'Cannot read property 'divideBy' of undefined', L.Proj with esri.leafletI am making a selection with ArcObjects, is there an Issue with iSelectionSet:AddList or do i have an error somewhere?Does DotSpatial Reproject work for non-global to global projections?DotSpatial Versions on GitHubCalculating M (shot point) values along points in shapefile using C# and DotSpatial?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















From the master branch and examples @ https://github.com/DotSpatial/DotSpatial the following fills the xy array with NaN but we expect 1755668,5922511



Dim x As Double() = {2666109}
Dim y As Double() = {6484213}
Dim z(x.Length - 1) As Double

Dim xy(2 * x.Length - 1) As Double
Dim ixy As Integer = 0
For i As Integer = 0 To x.Length - 1
xy(ixy) = x(i)
xy(ixy + 1) = y(i)
z(i) = 0
ixy += 2
Next

Dim srcsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(27200)
Dim destsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(2193)

Reproject.ReprojectPoints(xy:=xy,
z:=z,
source:=srcsys,
dest:=destsys,
startIndex:=0,
numPoints:=x.Length)









share|improve this question














bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • seems this is specific to New Zealand Map Grid (EPSG:27200) re projections (other projections work OK). I've posted a GitHub issue and will try to debug the source code,

    – ajayel
    Jun 27 '17 at 19:42


















0















From the master branch and examples @ https://github.com/DotSpatial/DotSpatial the following fills the xy array with NaN but we expect 1755668,5922511



Dim x As Double() = {2666109}
Dim y As Double() = {6484213}
Dim z(x.Length - 1) As Double

Dim xy(2 * x.Length - 1) As Double
Dim ixy As Integer = 0
For i As Integer = 0 To x.Length - 1
xy(ixy) = x(i)
xy(ixy + 1) = y(i)
z(i) = 0
ixy += 2
Next

Dim srcsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(27200)
Dim destsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(2193)

Reproject.ReprojectPoints(xy:=xy,
z:=z,
source:=srcsys,
dest:=destsys,
startIndex:=0,
numPoints:=x.Length)









share|improve this question














bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • seems this is specific to New Zealand Map Grid (EPSG:27200) re projections (other projections work OK). I've posted a GitHub issue and will try to debug the source code,

    – ajayel
    Jun 27 '17 at 19:42














0












0








0








From the master branch and examples @ https://github.com/DotSpatial/DotSpatial the following fills the xy array with NaN but we expect 1755668,5922511



Dim x As Double() = {2666109}
Dim y As Double() = {6484213}
Dim z(x.Length - 1) As Double

Dim xy(2 * x.Length - 1) As Double
Dim ixy As Integer = 0
For i As Integer = 0 To x.Length - 1
xy(ixy) = x(i)
xy(ixy + 1) = y(i)
z(i) = 0
ixy += 2
Next

Dim srcsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(27200)
Dim destsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(2193)

Reproject.ReprojectPoints(xy:=xy,
z:=z,
source:=srcsys,
dest:=destsys,
startIndex:=0,
numPoints:=x.Length)









share|improve this question














From the master branch and examples @ https://github.com/DotSpatial/DotSpatial the following fills the xy array with NaN but we expect 1755668,5922511



Dim x As Double() = {2666109}
Dim y As Double() = {6484213}
Dim z(x.Length - 1) As Double

Dim xy(2 * x.Length - 1) As Double
Dim ixy As Integer = 0
For i As Integer = 0 To x.Length - 1
xy(ixy) = x(i)
xy(ixy + 1) = y(i)
z(i) = 0
ixy += 2
Next

Dim srcsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(27200)
Dim destsys As ProjectionInfo = ProjectionInfo.FromEpsgCode(2193)

Reproject.ReprojectPoints(xy:=xy,
z:=z,
source:=srcsys,
dest:=destsys,
startIndex:=0,
numPoints:=x.Length)






coordinate-system .net vb.net dotspatial






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 27 '17 at 5:45









ajayelajayel

188118




188118





bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • seems this is specific to New Zealand Map Grid (EPSG:27200) re projections (other projections work OK). I've posted a GitHub issue and will try to debug the source code,

    – ajayel
    Jun 27 '17 at 19:42



















  • seems this is specific to New Zealand Map Grid (EPSG:27200) re projections (other projections work OK). I've posted a GitHub issue and will try to debug the source code,

    – ajayel
    Jun 27 '17 at 19:42

















seems this is specific to New Zealand Map Grid (EPSG:27200) re projections (other projections work OK). I've posted a GitHub issue and will try to debug the source code,

– ajayel
Jun 27 '17 at 19:42





seems this is specific to New Zealand Map Grid (EPSG:27200) re projections (other projections work OK). I've posted a GitHub issue and will try to debug the source code,

– ajayel
Jun 27 '17 at 19:42










2 Answers
2






active

oldest

votes


















0














I'm not a .Net developer but I suspect that your arrays Z and XY are both initialized to length 0 (x.length - 1) when they should be length 1 (x.length) and 2 (2 * x.length) respectively. And, depending on how loops work in .Net you may not even execute the loop as it runs from 0 to 0 to fill them in so there is no error.






share|improve this answer































    0














    I had exactly the same thing happen when using Sphere Azimuthal Equidistant http://epsg.io/53032.



    (Proj.4): +proj=aeqd +lat_0=-40 +lon_0=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs






    share|improve this answer
























      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%2f245473%2fwhy-does-dotspatial-return-nan-for-point-reprojection%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I'm not a .Net developer but I suspect that your arrays Z and XY are both initialized to length 0 (x.length - 1) when they should be length 1 (x.length) and 2 (2 * x.length) respectively. And, depending on how loops work in .Net you may not even execute the loop as it runs from 0 to 0 to fill them in so there is no error.






      share|improve this answer




























        0














        I'm not a .Net developer but I suspect that your arrays Z and XY are both initialized to length 0 (x.length - 1) when they should be length 1 (x.length) and 2 (2 * x.length) respectively. And, depending on how loops work in .Net you may not even execute the loop as it runs from 0 to 0 to fill them in so there is no error.






        share|improve this answer


























          0












          0








          0







          I'm not a .Net developer but I suspect that your arrays Z and XY are both initialized to length 0 (x.length - 1) when they should be length 1 (x.length) and 2 (2 * x.length) respectively. And, depending on how loops work in .Net you may not even execute the loop as it runs from 0 to 0 to fill them in so there is no error.






          share|improve this answer













          I'm not a .Net developer but I suspect that your arrays Z and XY are both initialized to length 0 (x.length - 1) when they should be length 1 (x.length) and 2 (2 * x.length) respectively. And, depending on how loops work in .Net you may not even execute the loop as it runs from 0 to 0 to fill them in so there is no error.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 27 '17 at 8:07









          Ian TurtonIan Turton

          50.3k548119




          50.3k548119

























              0














              I had exactly the same thing happen when using Sphere Azimuthal Equidistant http://epsg.io/53032.



              (Proj.4): +proj=aeqd +lat_0=-40 +lon_0=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs






              share|improve this answer




























                0














                I had exactly the same thing happen when using Sphere Azimuthal Equidistant http://epsg.io/53032.



                (Proj.4): +proj=aeqd +lat_0=-40 +lon_0=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs






                share|improve this answer


























                  0












                  0








                  0







                  I had exactly the same thing happen when using Sphere Azimuthal Equidistant http://epsg.io/53032.



                  (Proj.4): +proj=aeqd +lat_0=-40 +lon_0=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs






                  share|improve this answer













                  I had exactly the same thing happen when using Sphere Azimuthal Equidistant http://epsg.io/53032.



                  (Proj.4): +proj=aeqd +lat_0=-40 +lon_0=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 15 '18 at 15:46









                  Tim MakinsTim Makins

                  114




                  114






























                      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%2f245473%2fwhy-does-dotspatial-return-nan-for-point-reprojection%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

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

                      Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

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