Skip to content

Commit

Permalink
cleanup/fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zdila committed Jan 7, 2024
1 parent af5ea51 commit 98f1b65
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion style/CountryNames.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function CountryNames() {
opacity={0.33}
compOp="src-in"
maxZoom={7}
sql="SELECT ST_SetSRID(ST_MakePoint(0, 0), 3857) AS geom LIMIT 0" // some empty data
sql="SELECT geometry FROM osm_features LIMIT 0" // some empty data
/>

<Borders forLowzoom />
Expand Down
6 changes: 1 addition & 5 deletions style/Landcover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ export function Landcover() {
<PolygonSymbolizer fill={colors.farmland} />
</RuleEx>

<RuleEx type={["meadow", "park", "cemetery", "village_green"]}>
<PolygonSymbolizer fill={colors.grassy} />
</RuleEx>

<RuleEx type={["fell", "grassland", "grass"]}>
<RuleEx type={["meadow", "park", "cemetery", "village_green", "fell", "grassland", "grass"]}>
<PolygonSymbolizer fill={colors.grassy} />
</RuleEx>

Expand Down
10 changes: 5 additions & 5 deletions style/ShadingAndContours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ export function ShadingAndCountours({ contours, shading }: Props) {

<HillshadeStyle />

<CountryShadingAndContours contours={contours} shading={shading} cc="at" cutCcs={["sk", "ch", "si", "cz"]} />
<CountryShadingAndContours contours={contours} shading={shading} cc="at" cutCcs={["sk", "si", "cz"]} />

<CountryShadingAndContours contours={contours} shading={shading} cc="it" cutCcs={["at", "ch", "si", "fr"]} />

<CountryShadingAndContours contours={contours} shading={shading} cc="ch" cutCcs={[]} />
<CountryShadingAndContours contours={contours} shading={shading} cc="ch" cutCcs={["at", "fr"]} />

<CountryShadingAndContours contours={contours} shading={shading} cc="si" cutCcs={[]} />

Expand All @@ -150,13 +150,13 @@ export function ShadingAndCountours({ contours, shading }: Props) {

<CountryShadingAndContours contours={contours} shading={shading} cc="sk" cutCcs={[]} />

<CountryShadingAndContours contours={contours} shading={shading} cc="fr" cutCcs={["ch"]} />
<CountryShadingAndContours contours={contours} shading={shading} cc="fr" cutCcs={[]} />

{/* to cut out detailed */}
<SqlLayer
styleName="sea" // any
compOp="src-over"
sql="SELECT ST_SetSRID(ST_MakePoint(0, 0), 3857) AS geom LIMIT 0" // some empty data
sql="SELECT geometry FROM osm_features LIMIT 0" // some empty data
>
{["it", "at", "ch", "si", "pl", "sk", "cz", "fr"].map((cc) => (
<GdalLayer styleName="shadingAndContoursMask" file={`shading/${cc}/mask.tif`} />
Expand All @@ -165,7 +165,7 @@ export function ShadingAndCountours({ contours, shading }: Props) {
<SqlLayer
styleName="sea" // any
compOp="src-out"
sql="SELECT ST_SetSRID(ST_MakePoint(0, 0), 3857) AS geom LIMIT 0" // some empty data
sql="SELECT geometry FROM osm_features LIMIT 0" // some empty data
>
{contours && (
<SqlLayer
Expand Down
4 changes: 2 additions & 2 deletions style/WaterArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export function WaterArea() {
<SqlLayer
styleName="water_area"
maxZoom={11}
sql="SELECT geometry, type, intermittent OR seasonal AS tmp FROM osm_waterareas_gen1 WHERE geometry && !bbox!"
sql="SELECT geometry, intermittent OR seasonal AS tmp FROM osm_waterareas_gen1 WHERE geometry && !bbox!"
/>

<SqlLayer
styleName="water_area"
minZoom={12}
sql="SELECT geometry, type, intermittent OR seasonal AS tmp FROM osm_waterareas WHERE geometry && !bbox!"
sql="SELECT geometry, intermittent OR seasonal AS tmp FROM osm_waterareas WHERE geometry && !bbox!"
/>

<SqlLayer
Expand Down
4 changes: 2 additions & 2 deletions style/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function RouteStyles({ glows, types }: Props) {
<LineSymbolizer {...glowStyle} strokeWidth={wf + 1} offset={offset} />
) : (
<LinePatternSymbolizer
file={`/tmp/horse-${color}.svg`}
file={path.resolve(tmpdir(), `horse-${color}.svg`)}
offset={offset}
transform={`scale(${wf / 2})`}
/>
Expand Down Expand Up @@ -301,7 +301,7 @@ function RouteStyles({ glows, types }: Props) {
<LineSymbolizer {...glowStyle} strokeWidth={wf * 1.5 + 1} offset={offset} />
) : (
<LinePatternSymbolizer
file={`/tmp/ski-${color}.svg`}
file={path.resolve(tmpdir(), `ski-${color}.svg`)}
offset={offset}
transform={`scale(${wf / 2})`}
/>
Expand Down

0 comments on commit 98f1b65

Please sign in to comment.