SHARE
TWEET

Untitled

a guest Jun 27th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Rule>
  2.       <Name>Secondary_tunnel_stor-1</Name>
  3.       <ogc:Filter>
  4.         <ogc:And>
  5.           <ogc:PropertyIsEqualTo>
  6.             <ogc:PropertyName>highway</ogc:PropertyName>
  7.             <ogc:Literal>secondary</ogc:Literal>              
  8.           </ogc:PropertyIsEqualTo>
  9.           <ogc:PropertyIsEqualTo>
  10.             <ogc:PropertyName>tunnel</ogc:PropertyName>
  11.             <ogc:Literal>yes</ogc:Literal>              
  12.           </ogc:PropertyIsEqualTo>
  13.         </ogc:And>
  14.       </ogc:Filter>
  15.       <MinScaleDenominator>68001</MinScaleDenominator>
  16.       <MaxScaleDenominator>272000</MaxScaleDenominator>
  17.       <LineSymbolizer>
  18.         <Stroke>
  19.           <CssParameter name="stroke">#666666</CssParameter>
  20.           <CssParameter name="stroke-width">3</CssParameter>
  21.           <CssParameter name="stroke-dasharray">8 4</CssParameter>
  22.         </Stroke>
  23.       </LineSymbolizer>
  24.       <LineSymbolizer>
  25.         <Stroke>
  26.           <CssParameter name="stroke">#faeae6</CssParameter>
  27.           <CssParameter name="stroke-width">1.5</CssParameter>
  28.         </Stroke>
  29.       </LineSymbolizer>
  30.     </Rule>
  31.      
  32. SELECT
  33. "id_pkey",
  34. "natural",
  35. "landuse",
  36. "waterway",
  37. encode(
  38.     ST_AsBinary ( CASE WHEN ST_HasArc ( "the_geom" ) THEN "the_geom" ELSE ST_Simplify ( ST_Force2D ( "the_geom" ), 7803.3542335301645, TRUE ) END ),
  39.     'base64'
  40. ) AS "the_geom"
  41. FROM
  42. "myschema"."mytable"
  43. WHERE
  44. (
  45.     "the_geom" && ST_GeomFromText ( 'POLYGON ((11888876.271085668 4251249.343989519, 11888876.271085668 11795995.306196207, 17000073.294047713 11795995.306196207, 17000073.294047713 4251249.343989519, 11888876.271085668 4251249.343989519))', 3857 )
  46.     AND ((
  47.             "natural" = 'wood'
  48.             AND "natural" IS NOT NULL
  49.             )
  50.         OR ( "landuse" = 'forest' AND "landuse" IS NOT NULL )
  51.         OR ( "natural" = 'glacier' AND "natural" IS NOT NULL )
  52.         OR ( "waterway" = 'glacier' AND "waterway" IS NOT NULL )
  53.         OR ( "natural" = 'sand' AND "natural" IS NOT NULL )
  54.         OR ( "natural" = 'grassland' AND "natural" IS NOT NULL )
  55.         OR ( "landuse" = 'residential' AND "landuse" IS NOT NULL )
  56.         OR ( "landuse" = 'commercial' AND "landuse" IS NOT NULL )
  57.         OR ( "landuse" = 'retail' AND "landuse" IS NOT NULL )
  58.         OR ( "landuse" = 'industrial' AND "landuse" IS NOT NULL )
  59.         OR ( "landuse" = 'farmland' AND "landuse" IS NOT NULL )
  60.         OR ( "landuse" = 'farmyard' AND "landuse" IS NOT NULL )
  61.         OR ( "landuse" = 'orchard' AND "landuse" IS NOT NULL )
  62.         OR ( "landuse" = 'vineyard' AND "landuse" IS NOT NULL )
  63.         OR ( "landuse" = 'grass' AND "landuse" IS NOT NULL )
  64.         OR ( "natural" = 'water' AND "natural" IS NOT NULL )
  65.         OR ( "waterway" = 'riverbank' AND "waterway" IS NOT NULL )
  66.     OR ( "landuse" = 'reservoir' AND "landuse" IS NOT NULL )
  67. OR ( "waterway" = 'canal' AND "waterway" IS NOT NULL )))
  68.      
  69. CREATE INDEX combined_idx
  70.   ON myschema.mytable
  71.   USING btree
  72.   ("natural" COLLATE pg_catalog."default", landuse COLLATE pg_catalog."default", waterway COLLATE pg_catalog."default")
  73.   WHERE ("natural" = ANY (ARRAY['wood'::text, 'glacier'::text, 'sand'::text, 'grassland'::text, 'water'::text])) OR (landuse = ANY (ARRAY['forest'::text, 'residential'::text, 'commercial'::text, 'retail'::text, 'industrial'::text, 'farmland'::text, 'farmyard'::text, 'orchard'::text, 'vineyard'::text, 'grass'::text])) OR (waterway = ANY (ARRAY['riverbank'::text, 'canal'::text]));
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