SHARE
TWEET

Untitled

a guest Mar 19th, 2019 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.    ST_ASTEXT(ST_UNION(coord)::geography)
  3. from  sel_pai_coord
  4.      
  5. -- Table: public.sel_pai_coord
  6.  
  7. -- DROP TABLE public.sel_pai_coord;
  8.  
  9. CREATE TABLE public.sel_pai_coord
  10. (
  11.     _id bigint NOT NULL DEFAULT nextval('pai_list__id_seq'::regclass),
  12.     pai_id integer,
  13.     coord geometry,
  14.     CONSTRAINT pai_list_pkey PRIMARY KEY (_id)
  15. )
  16. WITH (
  17.     OIDS = FALSE,
  18.     FILLFACTOR = 60
  19. )
  20. TABLESPACE pg_default;
  21.  
  22. ALTER TABLE public.sel_pai_coord
  23.     OWNER to postgres;
  24.  
  25. GRANT ALL ON TABLE public.sel_pai_coord TO postgres;
  26.  
  27. -- Index: pai_coord_g_gpx
  28.  
  29. -- DROP INDEX public.pai_coord_g_gpx;
  30.  
  31. CREATE INDEX pai_coord_g_gpx
  32.     ON public.sel_pai_coord USING gist
  33.     (geography(coord))
  34.     TABLESPACE pg_default;
  35.  
  36. -- Index: pai_list__ID_idx
  37.  
  38. -- DROP INDEX public."pai_list__ID_idx";
  39.  
  40. CREATE INDEX "pai_list__ID_idx"
  41.     ON public.sel_pai_coord USING btree
  42.     (_id)
  43.     TABLESPACE pg_default;
  44.  
  45. -- Index: pai_pai_id_idx
  46.  
  47. -- DROP INDEX public.pai_pai_id_idx;
  48.  
  49. CREATE INDEX pai_pai_id_idx
  50.     ON public.sel_pai_coord USING btree
  51.     (pai_id)
  52.     TABLESPACE pg_default;
  53.  
  54. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (1,ST_GeometryFromText('POLYGON((32.915735224676 48.667318607159,32.915891361936 48.666724803316,32.914539289227 48.666574277365,32.911074894272 48.66615153185,32.910527024907 48.666443043425,32.91019769701 48.666664976548,32.915735224676 48.667318607159))'),1);
  55. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (2,ST_GeometryFromText('POLYGON((32.915493660079 48.668237787695,32.915735224676 48.667318607159,32.91019769701 48.666664976548,32.910122085301 48.666715959724,32.909659470992 48.667091603507,32.909242852252 48.667499993439,32.915493660079 48.668237787695))'),2);
  56. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (3,ST_GeometryFromText('POLYGON((32.915271957921 48.669080920698,32.915493660079 48.668237787695,32.909242852252 48.667499993439,32.909219009909 48.667523283735,32.908866986452 48.667961386873,32.908650866381 48.66829937205,32.915271957921 48.669080920698))'),3);
  57. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (4,ST_GeometryFromText('POLYGON((32.913126672039 48.669810358406,32.915023521616 48.670025666711,32.915271957921 48.669080920698,32.908650866381 48.66829937205,32.908579542278 48.668410858988,32.908518148319 48.66857554911,32.908584967335 48.668679454027,32.908828336937 48.66875448492,32.909034640224 48.668830904837,32.909105913012 48.668914378955,32.90909436983 48.668981411408,32.908731907312 48.669137010962,32.908723403544 48.669142797361,32.913165551105 48.669667237818,32.913126672039 48.669810358406))'),4);
  58. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (5,ST_GeometryFromText('POLYGON((32.920582872417 48.672076683794,32.920827389679 48.671146327546,32.914979272018 48.670456119152,32.914734772246 48.671386462768,32.920582872417 48.672076683794))'),5);
  59. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (6,ST_GeometryFromText('POLYGON((32.920827389679 48.671146327546,32.921077308006 48.670195442151,32.915229148016 48.669505246862,32.915090390777 48.670033247048,32.916268615163 48.670167037968,32.916243830023 48.670273780126,32.915064850186 48.670130642581,32.914979272018 48.670456119152,32.920827389679 48.671146327546))'),6);
  60. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (7,ST_GeometryFromText('POLYGON((32.921077308006 48.670195442151,32.921321807536 48.669265084665,32.91547375223 48.668574901037,32.915229148016 48.669505246862,32.921077308006 48.670195442151))'),7);
  61. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (8,ST_GeometryFromText('POLYGON((32.921566311873 48.668334726458,32.921813556528 48.667393563435,32.920349812344 48.667220860867,32.915958210013 48.66673220346,32.915718361245 48.66764455449,32.921566311873 48.668334726458))'),8);
  62. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (9,ST_GeometryFromText('POLYGON((32.927321705618 48.669028539037,32.927572799247 48.668072692532,32.921880414509 48.667401409699,32.921629216189 48.668357244553,32.927321705618 48.669028539037))'),9);
  63. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (10,ST_GeometryFromText('POLYGON((32.927321705618 48.669028539037,32.927572799247 48.668072692532,32.921880414509 48.667401409699,32.921629216189 48.668357244553,32.927321705618 48.669028539037))'),10);
  64. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (11,ST_GeometryFromText('POLYGON((32.92681949061 48.670940230111,32.926956163263 48.670419867204,32.927070602739 48.669984384897,32.921384145047 48.66931380306,32.921132914754 48.670269636742,32.92681949061 48.670940230111))'),11);
  65. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (12,ST_GeometryFromText('POLYGON((32.926568491411 48.671896073698,32.926675570784 48.671488321518,32.92681949061 48.670940230111,32.921126791783 48.670268912321,32.920875701452 48.671224744151,32.926568491411 48.671896073698))'),12);
  66. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (13,ST_GeometryFromText('POLYGON((32.926317360781 48.672851917621,32.926394844402 48.672556767017,32.926568491411 48.671896073698,32.920875701452 48.671224744151,32.92062446611 48.67218057642,32.926317360781 48.672851917621))'),13);
  67. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (14,ST_GeometryFromText('POLYGON((32.931207152705 48.674225601767,32.926114242385 48.673625219609,32.92606635666 48.673807759808,32.925821250407 48.674740649585,32.926368150929 48.674800677445,32.928662152468 48.675051784759,32.929982429368 48.675121512835,32.930807088239 48.675191813291,32.930920191503 48.675158292191,32.930989766653 48.675053541108,32.931207152705 48.674225601767))'),14);
  68. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (15,ST_GeometryFromText('POLYGON((32.931207152705 48.674225601767,32.931487799334 48.673157136326,32.926394844402 48.672556767017,32.926317360781 48.672851917621,32.926114242385 48.673625219609,32.931207152705 48.674225601767))'),15);
  69. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (16,ST_GeometryFromText('POLYGON((32.931487799334 48.673157136326,32.931768285075 48.672088671287,32.926675570784 48.671488321518,32.926568491411 48.671896073698,32.926394844402 48.672556767017,32.931487799334 48.673157136326))'),16);
  70. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (17,ST_GeometryFromText('POLYGON((32.931768285075 48.672088671287,32.932009325403 48.671170890793,32.932050800889 48.671020476693,32.926956163263 48.670419867204,32.92681949061 48.670940230111,32.926675570784 48.671488321518,32.931768285075 48.672088671287))'),17);
  71. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (18,ST_GeometryFromText('POLYGON((32.932050800889 48.671020476693,32.932344605673 48.669955463176,32.931495735526 48.669855414974,32.927236344423 48.669353303761,32.927070602739 48.669984384897,32.926956163263 48.670419867204,32.932050800889 48.671020476693))'),18);
  72. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (19,ST_GeometryFromText('POLYGON((32.931495735526 48.669855414974,32.931823300432 48.668608630593,32.931763713537 48.668594733187,32.931146099629 48.668497946921,32.930090652539 48.668369522092,32.927572799247 48.668072692532,32.927321705618 48.669028539037,32.927236344423 48.669353303761,32.931495735526 48.669855414974))'),19);
  73. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (20,ST_GeometryFromText('POLYGON((32.91482510697 48.670780494547,32.914930963048 48.670378059765,32.908356605342 48.66960199519,32.908314555227 48.669657802406,32.908179716846 48.669689305416,32.908041528378 48.669793567311,32.90799954542 48.669974830487,32.91482510697 48.670780494547))'),20);
  74. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (21,ST_GeometryFromText('POLYGON((32.914930963048 48.670378059765,32.914998120299 48.67012251257,32.913093526415 48.669891321224,32.913126672039 48.669810358406,32.913165551105 48.669667237818,32.908723403544 48.669142797361,32.908608226902 48.669221168442,32.908518465302 48.66938712538,32.908356605342 48.66960199519,32.914930963048 48.670378059765))'),21);
  75. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (22,ST_GeometryFromText('POLYGON((32.932344605673 48.669955463176,32.932637484196 48.6688938824,32.932227998806 48.668702882526,32.931823300432 48.668608630593,32.931495735526 48.669855414974,32.932344605673 48.669955463176))'),22);
  76. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (23,ST_GeometryFromText('POLYGON((32.927070602739 48.669984384897,32.927196114527 48.66950645788,32.92150361364 48.668835166233,32.921378008614 48.66931307876,32.927070602739 48.669984384897))'),23);
  77. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (24,ST_GeometryFromText('POLYGON((32.927196114527 48.66950645788,32.927236344423 48.669353303761,32.927321705618 48.669028539037,32.921629216189 48.668357244553,32.92150361364 48.668835166233,32.927196114527 48.66950645788))'),24);
  78. INSERT INTO "public"."pai_coord"("_id", "coord", "pai_id") VALUES (25,ST_GeometryFromText('POLYGON((32.911969252628 48.665848346027,32.912425604043 48.665889255856,32.912697717596 48.665946101607,32.914067703079 48.666132729519,32.915978609457 48.666406695549,32.916014641101 48.666247121965,32.915293649559 48.665772400265,32.914869229855 48.665237973359,32.913749591631 48.665282729695,32.913283709712 48.665337007128,32.913031635189 48.665391324223,32.912473914445 48.665604552088,32.911975635553 48.665814599979,32.911969252628 48.665848346027))'),25);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top