Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald-Mulder committed May 16, 2018
1 parent 3cc60a4 commit 9623001
Show file tree
Hide file tree
Showing 30 changed files with 5,220 additions and 208 deletions.
4,589 changes: 4,589 additions & 0 deletions Installer/Installer.vdproj

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion PostGIS3DExplorer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostGIS3DExplorer", "PostGIS3DExplorer\PostGIS3DExplorer.csproj", "{F4A2617E-AF82-4440-BB3F-BFC9594693A8}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Installer", "Installer\Installer.vdproj", "{FE0D2EF1-5B95-4BAC-849A-2C2057CA89D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,12 +23,16 @@ Global
{F4A2617E-AF82-4440-BB3F-BFC9594693A8}.Release|Any CPU.Build.0 = Release|Any CPU
{F4A2617E-AF82-4440-BB3F-BFC9594693A8}.Release|x86.ActiveCfg = Release|Any CPU
{F4A2617E-AF82-4440-BB3F-BFC9594693A8}.Release|x86.Build.0 = Release|Any CPU
{FE0D2EF1-5B95-4BAC-849A-2C2057CA89D9}.Debug|Any CPU.ActiveCfg = Debug
{FE0D2EF1-5B95-4BAC-849A-2C2057CA89D9}.Debug|x86.ActiveCfg = Debug
{FE0D2EF1-5B95-4BAC-849A-2C2057CA89D9}.Release|Any CPU.ActiveCfg = Release
{FE0D2EF1-5B95-4BAC-849A-2C2057CA89D9}.Release|x86.ActiveCfg = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
VisualSVNWorkingCopyRoot = .
SolutionGuid = {2ED13534-A060-4F34-8A69-4504C2AE352B}
VisualSVNWorkingCopyRoot = .
EndGlobalSection
EndGlobal
28 changes: 27 additions & 1 deletion PostGIS3DExplorer/DBHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,34 @@ public int GetSingleResultNonQuery(NpgsqlCommand pResultCommand)
return iReturn;
}

public DataTable PostGISExtensions()
{
DataTable pDataTable = null;

string sSQL = @"
select
name,
default_version,
installed_version,
comment
from
pg_available_extensions
where
name like 'post%'
and
installed_version is not null;";

if (m_pNpgsqlConnection.State == ConnectionState.Closed)
{
m_pNpgsqlConnection.Open();
}

NpgsqlCommand pResultCommand = new NpgsqlCommand(sSQL, m_pNpgsqlConnection);
pDataTable = GetDataTable(pResultCommand, "extensions");

return pDataTable;
}


}


Expand Down
26 changes: 16 additions & 10 deletions PostGIS3DExplorer/Demodata/Demo project 1 - Basisvormen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,45 @@
<Connection>
<Queries>
<Query>
<Name>Block</Name>
<Name>Blok</Name>
<SQL>select st_astext(&#xD;
(st_dump((st_extrude( st_expand(st_geomfromtext('point(0 0)', 28992), 5, 5), 0, 0, 10)))).geom&#xD;
(st_dump((st_extrude( st_expand(st_geomfromtext('point(10 10)', 28992), 5, 5), 0, 0, 10)))).geom&#xD;
)</SQL>
<FillColor>#FF8000</FillColor>
<FillColor>#80FF80</FillColor>
<Outline>true</Outline>
</Query>
<Query>
<Name>Cilinder</Name>
<Name>Lijn</Name>
<SQL>select st_astext(st_geometryfromtext('LINESTRING (10 10 -10, 10 10 20, 15 25 20)'))</SQL>
<FillColor>Red</FillColor>
<Outline>false</Outline>
</Query>
<Query>
<Name>Cilinder #1</Name>
<SQL>select st_astext(&#xD;
(st_dump(( st_extrude( st_buffer(st_geomfromtext('point(0 20 0)', 28992), 5, 15), 0, 0, 10) ))).geom&#xD;
)</SQL>
<FillColor>Yellow</FillColor>
<Outline>true</Outline>
<Outline>false</Outline>
</Query>
<Query>
<Name>Cilinder</Name>
<Name>Cilinder #2</Name>
<SQL>select st_astext(&#xD;
(st_dump(( st_translate( st_extrude( st_buffer(st_geomfromtext('point(0 0 0)', 28992), 2, 15), 0, 0, 30) , 0,0,-10) ))).geom&#xD;
)</SQL>
<FillColor>Aqua</FillColor>
<Outline>true</Outline>
<Outline>false</Outline>
</Query>
<Query>
<Name>Query</Name>
<Name>Blok minus Cilinder</Name>
<SQL>select st_astext(&#xD;
(st_dump(( &#xD;
&#xD;
st_3ddifference&#xD;
(&#xD;
st_extrude( st_expand(st_geomfromtext('point(0 0)', 28992), 5, 5), 0, 0, 10)&#xD;
st_extrude( st_expand(st_geomfromtext('point(-10 0)', 28992), 5, 5), 0, 0, 10)&#xD;
,&#xD;
st_translate( st_extrude( st_buffer(st_geomfromtext('point(0 0 0)', 28992), 4, 5), 0, 0, 30) , 0, 0,-10)&#xD;
st_translate( st_extrude( st_buffer(st_geomfromtext('point(-10 0 0)', 28992), 4, 5), 0, 0, 30) , 0, 0,-10)&#xD;
)&#xD;
&#xD;
))).geom&#xD;
Expand Down
72 changes: 68 additions & 4 deletions PostGIS3DExplorer/Demodata/Demo project 2 - AHN en BAG.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ from &#xD;
ahn_sample&#xD;
where &#xD;
classificatie = 2</SQL>
<FillColor>#0080C0</FillColor>
<FillColor>Yellow</FillColor>
<Outline>false</Outline>
</Query>
<Query>
<Name>Totaal - DEM maaiveld</Name>
<SQL>select &#xD;
st_AsText( (st_dump(ST_DelaunayTriangles(st_collect( geom ), 5))).geom )&#xD;
st_AsText( (st_dump(ST_DelaunayTriangles(st_collect( geom ), 10))).geom )&#xD;
from &#xD;
ahn_sample&#xD;
where &#xD;
classificatie = 2&#xD;
</SQL>
<FillColor>#FF8040</FillColor>
<FillColor>Silver</FillColor>
<Outline>false</Outline>
</Query>
<Query>
Expand All @@ -34,7 +34,7 @@ from &#xD;
ahn_sample&#xD;
where &#xD;
classificatie = 6</SQL>
<FillColor>Red</FillColor>
<FillColor>Fuchsia</FillColor>
<Outline>false</Outline>
</Query>
<Query>
Expand All @@ -48,6 +48,14 @@ where &#xD;
<FillColor>Green</FillColor>
<Outline>false</Outline>
</Query>
<Query>
<Name>Totaal - Pand contouren</Name>
<SQL>select st_astext(&#xD;
(st_dump((st_extrude( st_expand(st_geomfromtext('point(0 0)', 28992), 5, 5), 0, 0, 10)))).geom&#xD;
)</SQL>
<FillColor>#FF8000</FillColor>
<Outline>true</Outline>
</Query>
<Query>
<Name>Pand - LIDAR</Name>
<SQL>select &#xD;
Expand Down Expand Up @@ -120,6 +128,62 @@ where &#xD;
<FillColor>Yellow</FillColor>
<Outline>true</Outline>
</Query>
<Query>
<Name>Pand - Maaiveld #1</Name>
<SQL>select &#xD;
st_AsText( (st_dump(ST_DelaunayTriangles(st_collect( m.geom ), 2))).geom )&#xD;
from &#xD;
pand p,&#xD;
ahn_sample m&#xD;
where &#xD;
st_intersects(st_buffer(p.geom, 5), m.geom)&#xD;
and&#xD;
identificatie = '1722100000003767'&#xD;
and&#xD;
classificatie = 2</SQL>
<FillColor>#408080</FillColor>
<Outline>false</Outline>
</Query>
<Query>
<Name>Pand - Maaiveld #2</Name>
<SQL>select &#xD;
st_AsText( (st_dump(ST_DelaunayTriangles(st_collect( m.geom ), 2))).geom )&#xD;
from &#xD;
ahn_sample m&#xD;
where &#xD;
st_intersects(&#xD;
(select st_buffer(geom, 5) from pand where identificatie = '1722100000003767' limit 1), &#xD;
m.geom&#xD;
)&#xD;
and&#xD;
classificatie = 2&#xD;
</SQL>
<FillColor>Silver</FillColor>
<Outline>false</Outline>
</Query>
<Query>
<Name>Kabel</Name>
<SQL>select st_astext(st_translate(geom, 0, 0, 5 )) from kabel</SQL>
<FillColor>Yellow</FillColor>
<Outline>true</Outline>
</Query>
<Query>
<Name>Maaiveld vs Kabel intersectie</Name>
<SQL>select &#xD;
st_AsText( &#xD;
(st_dump(&#xD;
ST_3DInterSection(&#xD;
(ST_DelaunayTriangles(st_collect( geom ), 10)),&#xD;
(select st_translate(geom, 0, 0, 5 ) from kabel))&#xD;
)).geom&#xD;
)&#xD;
from &#xD;
ahn_sample&#xD;
where &#xD;
classificatie = 2</SQL>
<FillColor>Red</FillColor>
<Outline>true</Outline>
</Query>
</Queries>
<PostGISConnection>
<Name>Localhost</Name>
Expand Down
8 changes: 8 additions & 0 deletions PostGIS3DExplorer/Demodata/demodata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ create table public.pand
identificatie character(16)
);
copy public.pand from '[demodatapath]/pand.csv' CSV delimiter ';';

drop table if exists public.kabel;
create table public.kabel
(
geom geometry(linestringz, 28992)
);

insert into public.kabel values (st_GeometryFromText('LINESTRING Z (185764.938985971 594592.399697155 0,185862.536451284 594591.343447531 0)', 28992));
2 changes: 1 addition & 1 deletion PostGIS3DExplorer/DragDropReorderTreeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public DragDropReorderTreeView()

private void this_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.SelectedNode = this.GetNodeAt(e.X, e.Y);
//this.SelectedNode = this.GetNodeAt(e.X, e.Y);
}

private void this_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e)
Expand Down
71 changes: 69 additions & 2 deletions PostGIS3DExplorer/FrmConnection.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9623001

Please sign in to comment.