-
-
Save jjclavijo/8b71741421843a6753492977660e3e78 to your computer and use it in GitHub Desktop.
Conversiones A Geocentricas con datum POSGAR o CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "Conversiones A Geocentricas con datum POSGAR o CI", | |
"provenance": [], | |
"collapsed_sections": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"display_name": "Python 3", | |
"name": "python3" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/jjclavijo/8b71741421843a6753492977660e3e78/scratchpad.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "6Zl5PuxPihvJ" | |
}, | |
"source": [ | |
"_= !add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable\n", | |
"_= !apt-get update\n", | |
"_= !apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev \n", | |
"_= !apt-get install proj-bin" | |
], | |
"execution_count": 1, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "u4sMhrl-j1Vs", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "2e8f86f8-8fea-4fee-bb1c-336b1c6986f1" | |
}, | |
"source": [ | |
"# Gauss kruger Datum POSGAR a XYZ Geocentricas\n", | |
"\n", | |
"#El orden es siempre Longitud, latitud o Este, norte y es indispensable que aparezcan los dos 0s después\n", | |
"coordenadas = \"\"\"\n", | |
"1500980 5000000 0 0\n", | |
"1500980 5002000 0 0\n", | |
"1500980 5004010 0 0\n", | |
"EOF\"\"\"\n", | |
"\n", | |
"# Ejemplo de coordenada convertida a geocentricas, rotada 90 grados y luego vuelta a convertir. Del ecuador pasa al polo.\n", | |
"# notar que para rotaciones tan grandes se debe usar +exact en la transformación de helmert.\n", | |
"# https://proj.org/operations/transformations/helmert.html?highlight=exact#cmdoption-arg-exact\n", | |
"conversion = f\"\"\"+proj=pipeline \\\n", | |
" +step +inv +proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=intl\\\n", | |
" +step +proj=push +v_3\\\n", | |
" +step +proj=cart +ellps=GRS80\"\"\"\n", | |
"\n", | |
"!cct {conversion} <<EOF {coordenadas}" | |
], | |
"execution_count": 8, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
" 1393169.8338 -4284564.6629 -4499529.8377 0.0000\n", | |
" 1393607.9496 -4285913.0447 -4498119.2836 0.0000\n", | |
" 1394048.1180 -4287267.7437 -4496701.2281 0.0000\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "CcqMCKHNpSm_", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "2229d545-dff2-456b-bd5a-ca0d3f0f39e9" | |
}, | |
"source": [ | |
"# Gauss kruger Datum Campo inchauspe a XYZ Geocentricas\n", | |
"\n", | |
"coordenadas = \"\"\"\n", | |
"1500980 5000000 0 0\n", | |
"1500980 5002000 0 0\n", | |
"1500980 5004010 0 0\n", | |
"EOF\"\"\"\n", | |
"\n", | |
"# Ejemplo de coordenada convertida a geocentricas, rotada 90 grados y luego vuelta a convertir. Del ecuador pasa al polo.\n", | |
"# notar que para rotaciones tan grandes se debe usar +exact en la transformación de helmert.\n", | |
"# https://proj.org/operations/transformations/helmert.html?highlight=exact#cmdoption-arg-exact\n", | |
"conversion = f\"\"\"+proj=pipeline \\\n", | |
" +step +inv +proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=intl\\\n", | |
" +step +proj=push +v_3 \\\n", | |
" +step +proj=cart +ellps=intl \"\"\"\n", | |
"\n", | |
"!cct {conversion} <<EOF {coordenadas}" | |
], | |
"execution_count": 11, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
" 1393234.6000 -4284763.8454 -4499610.8580 0.0000\n", | |
" 1393672.7300 -4286112.2706 -4498200.2584 0.0000\n", | |
" 1394112.9126 -4287467.0134 -4496782.1571 0.0000\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "KLTcx7oLmOi1", | |
"outputId": "fd82cd83-4900-4b05-872b-82d918b4ef61" | |
}, | |
"source": [ | |
"# Geograficas Datum POSGAR a XYZ Geocentricas\n", | |
"\n", | |
"# Recuerden esto, es Longitud primero\n", | |
"coordenadas = \"\"\"\n", | |
"-71.5 -43 0 0\n", | |
"EOF\"\"\"\n", | |
"\n", | |
"# Ejemplo de coordenada convertida a geocentricas, rotada 90 grados y luego vuelta a convertir. Del ecuador pasa al polo.\n", | |
"# notar que para rotaciones tan grandes se debe usar +exact en la transformación de helmert.\n", | |
"# https://proj.org/operations/transformations/helmert.html?highlight=exact#cmdoption-arg-exact\n", | |
"conversion = f\"\"\"+proj=pipeline \\\n", | |
" +step +proj=push +v_3\\\n", | |
" +step +proj=cart +ellps=GRS80\"\"\"\n", | |
"\n", | |
"!cct {conversion} <<EOF {coordenadas}" | |
], | |
"execution_count": 12, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
" 1482432.5397 -4430523.8398 -4327501.7591 0.0000\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "oy6rdNnZmQRN", | |
"outputId": "cb757c97-06de-4d13-ebfc-8b890328d631" | |
}, | |
"source": [ | |
"# Geograficas Datum Campo inchauspe a XYZ Geocentricas\n", | |
"\n", | |
"coordenadas = \"\"\"\n", | |
"-71.5 -43 0 0\n", | |
"EOF\"\"\"\n", | |
"\n", | |
"# Ejemplo de coordenada convertida a geocentricas, rotada 90 grados y luego vuelta a convertir. Del ecuador pasa al polo.\n", | |
"# notar que para rotaciones tan grandes se debe usar +exact en la transformación de helmert.\n", | |
"# https://proj.org/operations/transformations/helmert.html?highlight=exact#cmdoption-arg-exact\n", | |
"conversion = f\"\"\"+proj=pipeline \\\n", | |
" +step +proj=push +v_3 \\\n", | |
" +step +proj=cart +ellps=intl \"\"\"\n", | |
"\n", | |
"!cct {conversion} <<EOF {coordenadas}" | |
], | |
"execution_count": 14, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
" 1482500.6623 -4430727.4366 -4327577.3659 0.0000\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "8ZyS-_45nK2Z" | |
}, | |
"source": [ | |
"" | |
], | |
"execution_count": null, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment