Skip to content

Instantly share code, notes, and snippets.

View pichot's full-sized avatar
🌍
Passionate urbanist, skeptical technologist

Jonathan Pichot pichot

🌍
Passionate urbanist, skeptical technologist
View GitHub Profile
<!DOCTYPE qgis_style>
<qgis_style version="2">
<symbols>
<symbol clip_to_extent="1" name="qlimt" force_rhr="0" type="fill" alpha="1">
<layer enabled="1" pass="0" locked="0" class="GeometryGenerator">
<prop v="Fill" k="SymbolType"/>
<prop v="with_variable('my_geom',&#xd;&#xa;CASE WHEN &#xd;&#xa; num_geometries( $geometry)>1&#xd;&#xa; THEN &#xd;&#xa; geometry_n( $geometry, @geometry_part_num)&#xd;&#xa; ELSE&#xd;&#xa; $geometry&#xd;&#xa; END,&#xd;&#xa; with_variable('shape',rand(1,4),&#xd;&#xa; CASE WHEN &#xd;&#xa; @shape =1&#xd;&#xa; THEN &#xd;&#xa; minimal_circle( @my_geom )&#xd;&#xa; WHEN&#xd;&#xa; @shape =2&#xd;&#xa; THEN&#xd;&#xa; oriented_bbox( @my_geom )&#xd;&#xa; WHEN&#xd;&#xa; @shape =3&#xd;&#xa; THEN&#xd;&#xa; oriented_bbox( @my_geom )&#xd;&#xa; WHEN&#xd;&#xa; @shape =4&#xd;&#xa; THEN&#xd;&#xa; simplify(@my_geom, rand(1,20))&#xd;&#xa; END))&#xd;&#xa; " k="geometryModifier"/>
<data_defined_properties>
<Option type="Map">
@brambow
brambow / postgis-to-geojson-feature-collection.sql
Last active April 25, 2023 15:44
PostGIS query to build a GeoJSON FeatureCollection
SELECT json_build_object(
'type', 'FeatureCollection',
'crs', json_build_object(
'type', 'name',
'properties', json_build_object(
'name', 'EPSG:4326'
)
),
'features', json_agg(
json_build_object(
@bertspaan
bertspaan / GTFS-to-GEOJSON.md
Last active May 13, 2017 22:47
Ruby script to convert GTFS stops and shapes to GeoJSON.

Ruby script to convert stops.txt and shapes.txt to GeoJSON.

@clhenrick
clhenrick / README.md
Last active April 1, 2024 14:55
PostgreSQL & PostGIS cheatsheet (a work in progress)