Skip to content

Commit

Permalink
Personnalsiation de la résolution
Browse files Browse the repository at this point in the history
  • Loading branch information
arno974 committed Dec 2, 2021
1 parent de13286 commit fd009b3
Show file tree
Hide file tree
Showing 35 changed files with 21 additions and 6 deletions.
Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ srid=3957
profilUnit= PERCENT
; dock panel = dock or minidock or rightdock
dock=dock
altiresolution= résolution du MNT

;si cas IGN
;altiProfileProvider= ign
Expand Down
Empty file modified altiProfil.jpeg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions altiProfil/classes/altiProfil.listener.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ protected function getAltiProviderConfig($configItem) {
'dock'=>'dock',
'srid'=>'3857',
'profilUnit'=>'PERCENT',
'altiresolution'=>25
);
if (empty($configItemValue) and array_key_exists($configItem, $defaultValues)) {
$configItemValue = $defaultValues[$configItem];
Expand Down
13 changes: 8 additions & 5 deletions altiProfil/classes/altiServicesFromDB.class.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function __construct($repository, $project) {
$this->AltiProfileTable = $localConfig->getValue('altiProfileTable', 'altiProfil');
$this->Altisource = $localConfig->getValue('altisource', 'altiProfil');
$this->profilUnit = $localConfig->getValue('profilUnit', 'altiProfil');
$this->AltiResolution = $localConfig->getValue('altiresolution', 'altiProfil');

// Get project config: override table and source per project
$this->repository = $repository;
Expand Down Expand Up @@ -110,14 +111,15 @@ protected function queryProfil($p1Lon, $p1Lat, $p2Lon, $p2Lat){
generate_series(
0,
ST_Length(line.geom)::int,
--for very long line we reduce the steps
CASE
WHEN ST_Length(line.geom)::int < 1000 THEN 5
ELSE 20
WHEN ST_Length(line.geom)::int < 1000 THEN %8$d
ELSE %8$d*5
END
) as i,
CASE
WHEN ST_Length(line.geom)::int < 1000 THEN 5
ELSE 20
WHEN ST_Length(line.geom)::int < 1000 THEN %8$d
ELSE %8$d*5
END as resolution
FROM line
),
Expand Down Expand Up @@ -154,7 +156,8 @@ protected function queryProfil($p1Lon, $p1Lat, $p2Lon, $p2Lat){
$p1Lon, $p1Lat,
$this->Srid,
$p2Lon, $p2Lat,
$this->profilUnit
$this->profilUnit,
$this->AltiResolution,
);
$cnx = jDb::getConnection('altiProfil');
$qResult = $cnx->query($sql);
Expand Down
Empty file modified altiProfil/classes/altiServicesFromIGN.class.php
100644 → 100755
Empty file.
Empty file modified altiProfil/controllers/ajax.classic.php
100644 → 100755
Empty file.
Empty file modified altiProfil/install/config/altiProfil.ini.php.dist
100644 → 100755
Empty file.
Empty file modified altiProfil/install/install.php
100644 → 100755
Empty file.
Empty file modified altiProfil/locales/en_US/altiProfil.UTF-8.properties
100644 → 100755
Empty file.
Empty file modified altiProfil/locales/fr_FR/altiProfil.UTF-8.properties
100644 → 100755
Empty file.
Empty file modified altiProfil/module.xml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions altiProfil/templates/altiProfil_Dock.tpl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var LOCALES_ALTI_SLOPE = "{@altiProfil~altiProfil.alti.slope@}";
var ALTI_PROVIDER = "{$altiProvider}";
{if $altiProvider == "database"}
{if $profilUnit == "DEGREES"}
var LOCALES_ALTI_UNIT = "{@altiProfil~altiProfil.alti.degrees@}";
Expand Down
Empty file modified altiProfil/themes/view/map.tpl
100644 → 100755
Empty file.
Empty file modified altiProfil/urls.xml
100644 → 100755
Empty file.
Empty file modified altiProfil/www/css/altiProfil.css
100644 → 100755
Empty file.
Empty file modified altiProfil/www/img/noun_altitude.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified altiProfil/www/img/noun_altitude.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified altiProfil/www/img/noun_altitude_click.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified altiProfil/www/img/noun_altitude_custom.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion altiProfil/www/js/altiProfil.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function getProfil(p1,p2){
'srs': lizMap.map.projection.projCode,
'repository': lizUrls.params.repository,
'project': lizUrls.params.project,
'sampling' : Math.round(p1.distanceTo(p2))/2 /* Seulement utilisé pour l'IGN => Nombre de points constituant le graphique */
'sampling' : Math.round(p1.distanceTo(p2))/2 /* Only use with french mapping Agency (IGN) web service */
}

getProfilJsonResponse(qParams, function(data){
Expand Down Expand Up @@ -275,7 +275,10 @@ function initAltiProfil() {
altiProfilLayer.addFeatures(
[new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([p1Geom, p2Geom]))]
);

getProfil(p1Geom, p2Geom);
//setTimeout(() => { getProfil(p1Geom, p2Geom); }, 5000);

$('#altiProfil .menu-content #profil-chart').show();
}
}
Expand Down
Empty file modified altiProfilAdmin.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified altiProfilAdmin/classes/altiProfilAdmin.listener.php
100644 → 100755
Empty file.
Empty file modified altiProfilAdmin/events.xml
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions altiProfilAdmin/forms/config.form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<label locale="altiProfilAdmin~admin.form.altisource.label" />
</textarea>

<input ref="altiresolution" required="true" type="integer">
<label locale="altiProfilAdmin~admin.form.altiresolution.label" />
</input>

<menulist ref="profilUnit" required="true">
<label locale="altiProfilAdmin~admin.form.profilUnit.label" />
<item value="PERCENT" selected="true" locale="altiProfilAdmin~admin.form.profilUnit.percent.label"/>
Expand Down
Empty file modified altiProfilAdmin/install/install.php
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions altiProfilAdmin/locales/en_US/admin.UTF-8.properties
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ form.altiProfileTable.label=Database table
form.srid.label=SRID
form.ignServiceKey.label=IGN key
form.ignServiceUrl.label=IGN service URL
form.altiresolution.label=Resolution
1 change: 1 addition & 0 deletions altiProfilAdmin/locales/fr_FR/admin.UTF-8.properties
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ form.altiProfileTable.label=Table de la base
form.srid.label=SRID
form.ignServiceKey.label=Clé IGN
form.ignServiceUrl.label=URL du service IGN
form.altiresolution.label=Résolution
Empty file modified altiProfilAdmin/module.xml
100644 → 100755
Empty file.
Empty file modified altiProfilAdmin/templates/config_edit.tpl
100644 → 100755
Empty file.
Empty file modified altiProfilAdmin/templates/config_view.tpl
100644 → 100755
Empty file.
Empty file modified altiProfilAdmin/urls.xml
100644 → 100755
Empty file.
Empty file modified altiProfilAdmin/www/js/alti_profil_config.js
100644 → 100755
Empty file.
Empty file modified composer.json
100644 → 100755
Empty file.

0 comments on commit fd009b3

Please sign in to comment.