Ruby script to convert stops.txt
and shapes.txt
to GeoJSON.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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',
CASE WHEN 
 num_geometries( $geometry)>1
 THEN 
 geometry_n( $geometry, @geometry_part_num)
 ELSE
 $geometry
 END,
 with_variable('shape',rand(1,4),
 CASE WHEN 
 @shape =1
 THEN 
 minimal_circle( @my_geom )
 WHEN
 @shape =2
 THEN
 oriented_bbox( @my_geom )
 WHEN
 @shape =3
 THEN
 oriented_bbox( @my_geom )
 WHEN
 @shape =4
 THEN
 simplify(@my_geom, rand(1,20))
 END))
 " k="geometryModifier"/> | |
<data_defined_properties> | |
<Option type="Map"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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( |
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.