Skip to content

Instantly share code, notes, and snippets.

@luqmaan
Last active August 29, 2015 14:22
Show Gist options
  • Save luqmaan/5fb96ad10f16742f23d1 to your computer and use it in GitHub Desktop.
Save luqmaan/5fb96ad10f16742f23d1 to your computer and use it in GitHub Desktop.
Transform EPSG 2277 into normal latitude and longitude. Used with Austin's Parks and Recreation park data. Uses PostGIS
POLYGON((-97.7687362778002 30.3717650351804,-97.768874049635 30.37169765521,-97.7692586673678 30.3715035247484,-97.7692652959938 30.3712927241672,-97.7692689401395 30.3711767965393,-97.7691567890296 30.3700707061847,-97.7696624503949 30.3697197483224,-97.7696878711314 30.369743111801,-97.7697144892603 30.3697583862574,-97.7697440930412 30.3697686862194,-97.7697754888891 30.3697736584759,-97.769792786984 30.3697733184167,-97.7698073842607 30.3697730317559,-97.7698224757268 30.369770047947,-97.7698384731024 30.3697668864334,-97.7698518705641 30.3697616264478,-97.7699310336165 30.3701926741441,-97.7697306441092 30.3704822675733,-97.769610264213 30.3707748368802,-97.7696057520131 30.3710638901788,-97.7695281780238 30.3713284346645,-97.769442100388 30.3713889260538,-97.7693321719845 30.3718848706923,-97.7693698240369 30.3719898067316,-97.7695186565339 30.3723881433225,-97.7694357653889 30.3725423479022,-97.7693561907433 30.3725038488624,-97.7693241006164 30.3725475421472,-97.7690220719379 30.3726333114381,-97.7690081239144 30.3726354256063,-97.7689988297647 30.372656911333,-97.7689158458093 30.3728110045608,-97.7688807070934 30.3728536478272,-97.7684226014261 30.3727408282809,-97.7682971561747 30.3725808991305,-97.7680532199441 30.3724024925089,-97.7678954109262 30.3723263703513,-97.7676372473382 30.3719424019777,-97.7674904032957 30.3714411294055,-97.7674358088374 30.3710705293486,-97.7674609145505 30.3710497164508,-97.7676547642112 30.3712387184326,-97.7677583982991 30.3713516863758,-97.7680394614612 30.3716581122954,-97.7684112394616 30.3714244513452,-97.7684262269274 30.3714464794198,-97.7684502200084 30.3714686316246,-97.7684792327543 30.3714857137813,-97.7685088976561 30.3714962742153,-97.7685326305604 30.3715025805994,-97.7685507071573 30.3715114836105,-97.7685613711613 30.3715196446624,-97.7685704758633 30.371529151508,-97.7687362778002 30.3717650351804))
SELECT
ST_AsText(
ST_Transform(
ST_GeomFromGeoJson('
{
"crs": {
"type": "name",
"properties": {
"name": "EPSG:2277"
}
},
"type": "Polygon",
"coordinates": [
[
[
3105258.55034664,
10108267.6501512
],
[
3105215.68035364,
10108242.1498741
],
[
3105096.05034356,
10108168.7700996
],
[
3105095.72750956,
10108092.0766835
],
[
3105095.55034457,
10108049.8999306
],
[
3105140.17984848,
10107648.5503396
],
[
3104983.70017457,
10107517.2700903
],
[
3104975.48988914,
10107525.5801131
],
[
3104966.96989307,
10107530.9403386
],
[
3104957.55029248,
10107534.4701871
],
[
3104947.61035173,
10107536.0499084
],
[
3104942.15957522,
10107535.800565
],
[
3104937.55984689,
10107535.5902636
],
[
3104932.82691672,
10107534.3957122
],
[
3104927.8098664,
10107533.1299667
],
[
3104923.63008474,
10107531.1201282
],
[
3104895.0599319,
10107687.2700784
],
[
3104955.81013848,
10107794.0198649
],
[
3104991.31039557,
10107901.2703065
],
[
3104990.31039757,
10108006.4003456
],
[
3105012.5498544,
10108103.1501521
],
[
3105039.18037857,
10108125.7698575
],
[
3105069.68031757,
10108306.8899021
],
[
3105056.93034306,
10108344.7700757
],
[
3105006.6699449,
10108488.5201163
],
[
3105031.51011832,
10108545.1899505
],
[
3105056.9198444,
10108531.7703579
],
[
3105066.67048107,
10108547.8900763
],
[
3105161.17029206,
10108581.2702589
],
[
3105165.54987648,
10108582.1403359
],
[
3105168.29987098,
10108590.0199133
],
[
3105193.16989999,
10108646.6500494
],
[
3105203.89035098,
10108662.4101885
],
[
3105349.26013899,
10108624.7203032
],
[
3105390.1494929,
10108567.483541
],
[
3105468.54992665,
10108504.3901633
],
[
3105518.93991773,
10108477.8603607
],
[
3105603.55031282,
10108340.1303212
],
[
3105654.04988374,
10108158.9400668
],
[
3105674.37038115,
10108024.5902699
],
[
3105666.62991107,
10108016.8402854
],
[
3105603.92990524,
10108084.1498621
],
[
3105570.30989373,
10108124.4703195
],
[
3105479.12995797,
10108233.8401795
],
[
3105363.8798604,
10108146.1799217
],
[
3105358.97009331,
10108154.0801684
],
[
3105351.22010882,
10108161.9600739
],
[
3105341.93010114,
10108167.9600619
],
[
3105332.48917514,
10108171.5840704
],
[
3105324.95408523,
10108173.704473
],
[
3105319.18047473,
10108176.8101098
],
[
3105315.75003541,
10108179.6998678
],
[
3105312.79991007,
10108183.090281
],
[
3105258.55034664,
10108267.6501512
]
]
]
}
'),
4326)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment