Skip to content

Instantly share code, notes, and snippets.

View vpicavet's full-sized avatar

Vincent Picavet vpicavet

View GitHub Profile

Role Models

Modèles d’organisation ouverts dans les entreprises du logiciel libre

Le constat

Le modèle d’entreprise le plus visible aujourd’hui est très hiérarchisé, généralement avec une concentration des pouvoirs et des informations, et des dérives autoritaires fréquentes. Du fait de son omniprésence, ce modèle est souvent considéré le seul viable, en dépit des nombreuses critiques qu’il reçoit.

Par contraste, beaucoup d'entreprises innovent en terme de structuration organisationnelle. Elles ont adopté et explorent encore des modèles alternatifs. Dans le milieu du logiciel libre notamment, se sont multi

@vpicavet
vpicavet / gist:a981ddeb6c2fcac0d9a1
Created February 23, 2016 16:34
PostGIS BRIN indexes quick test case
# data test for PostGIS BRIN Indexes
# a small dataset ( ~400K rows for roads)
wget http://download.geofabrik.de/europe/france/bretagne-latest.shp.zip
unzip bretagne-latest.shp.zip
shp2pgsql -s 4326:2154 -I landuse.shp landuse | psql -h localhost -p 32770 -U pggis -d pggis
shp2pgsql -s 4326:2154 -I natural.shp natural | psql -h localhost -p 32770 -U pggis -d pggis
shp2pgsql -s 4326:2154 -I places.shp places | psql -h localhost -p 32770 -U pggis -d pggis
shp2pgsql -s 4326:2154 -I points.shp points | psql -h localhost -p 32770 -U pggis -d pggis

Keybase proof

I hereby claim:

  • I am vpicavet on github.
  • I am vpicavet (https://keybase.io/vpicavet) on keybase.
  • I have a public key whose fingerprint is F1C8 7D90 27DF 92E6 AD21 B5E2 9C27 E9F9 1993 2563

To claim this, I am signing this object:

-- Open These views with QGIS
-- You can label the ticks view with this expression : "CASE WHEN m % 5 = 0 THEN h END" to get hour numbers
-- Set categorized styles on typ and unit to set different styles for dials, and for the hands
-- Please tweet your best clock designs with #PostGISClock hashtag
create or replace view ticks as
select
m as id
, case when m % 5 = 0 then 'h' else 'm' end as typ
, m % 5 as h
@vpicavet
vpicavet / node_edges.sql
Last active December 24, 2023 18:17
Generate a network geometry edge table in PostGIS according to a edge table and topology relations (to/from nodes) - with triggers
/*
Vincent Picavet <vincent.picavet@oslandia.com>
Work distributed under MIT Licence.
Automated generation of edges geometries according to topology and nodes geometry
A nodes table and a edges table design a network.
Edges are straight lines between id_from and id_to nodes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff --git a/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp b/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp
index 09d540e..608e78f 100644
--- a/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp
+++ b/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp
@@ -1057,6 +1057,19 @@ GBool MITABLookupCoordSysBounds(TABProjInfo *psCS,
MapInfoBoundsInfo *psList, **ppsList;
/*-----------------------------------------------------------------
+ * Try to load the user defined table if not loaded yet .
+ *----------------------------------------------------------------*/
diff --git a/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp b/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp
index f66ef0b..09d540e 100644
--- a/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp
+++ b/ogr/ogrsf_frmts/mitab/mitab_bounds.cpp
@@ -85,6 +85,7 @@ static MapInfoBoundsInfo gasBoundsList[] = {
{{3, 0, 3, {-84.3666666667,41.5,42.1,43.6666666667,13123359.58,0}, 0,0,0,0, {0,0,0,0,0}}, -318674512.717618, -308729738.1419, 344921231.877618, 354866006.453336},
{{3, 0, 3, {-84.3666666667,43.3166666667,44.1833333333,45.7,19685039.37,0}, 0,0,0,0, {0,0,0,0,0}}, -334588341.234808, -332680007.139814, 373958419.974808, 375866754.069803},
{{3, 0, 3, {-87,44.7833333333,45.4833333333,47.0833333333,26246719.16,0}, 0,0,0,0, {0,0,0,0,0}}, -343541891.912548, -349200540.720143, 396035330.232548, 390376681.424953},
+{{3, 0, 7, {3,46.5,49,44,700000,6600000}, 0,0,0,0, {0,0,0,0,0}}, -357823.2365, 6037008.6939, 1313632.3628, 7230727.3772},
{{3, 0, 7, {-100,39.8333333333,40,43,500000,0}, 0,0,0,0, {0,0,0,0,0}}, -96293653.747449, -89392122.913416,
diff --git a/ogr/ogrsf_frmts/mitab/mitab_mapheaderblock.cpp b/ogr/ogrsf_frmts/mitab/mitab_mapheaderblock.cpp
index b8a53bd..155684b 100644
--- a/ogr/ogrsf_frmts/mitab/mitab_mapheaderblock.cpp
+++ b/ogr/ogrsf_frmts/mitab/mitab_mapheaderblock.cpp
@@ -862,7 +862,27 @@ int TABMAPHeaderBlock::CommitToFile()
WriteDouble(m_YDispl);
for(i=0; i<6; i++)
- WriteDouble(m_sProj.adProjParams[i]);
+ {