This file contains hidden or 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
void Main() | |
{ | |
Configure(); | |
for (int i = 0; i < OSGeo.OGR.Ogr.GetDriverCount(); i++) | |
{ | |
OSGeo.OGR.Ogr.GetDriver(i).Dump(); | |
} | |
} |
This file contains hidden or 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
ogr2ogr -f "ESRI Shapefile" "PROPERTY_VIEW.shp" "MSSQL:server=.;database=Flux;tables=vmprop.PROPERTY_VIEW;trusted_connection=yes" -t_srs EPSG:28355 -sql "SELECT [PFI],[SP_GEOMETRY] FROM [vmprop].[PROPERTY_VIEW]" -overwrite |
This file contains hidden or 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
ogrinfo -sql "CREATE SPATIAL INDEX ON PROPERTY_VIEW" "PROPERTY_VIEW.shp" |
This file contains hidden or 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
ogrinfo -sql "DROP INDEX ON PROPERTY_VIEW" "PROPERTY_VIEW.shp" | |
ogrinfo -sql "CREATE INDEX ON PROPERTY_VIEW USING PFI" "PROPERTY_VIEW.shp" |
This file contains hidden or 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
const string epsgPath = | |
@"C:\Flux\Bin\release-1500-x64-gdal-1-11-1-mapserver-6-4-1\bin\proj\SHARE\epsg"; | |
readonly static IEnumerable<string> EpsgLines = File.ReadLines(epsgPath); |
This file contains hidden or 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
List<int> GetEpsgFromProj4(string proj4) | |
{ | |
var pattern = new Regex("<(\\d+)>"); | |
return EpsgLines | |
.Where(x => x.Contains(proj4)) | |
.Select(text => int.Parse(pattern.Match(text).Groups[1].Value)).ToList(); | |
} |
This file contains hidden or 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
GetEpsgFromProj4( | |
"+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs") | |
5551 | |
28355 |
This file contains hidden or 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
MAP | |
DEFRESOLUTION 96 | |
EXTENT 318976.415 5794580.85470479 340483.86 5822197.32929521 | |
FONTSET "C:\\Program Files (x86)\\MapManager20\\templates\\font.list" | |
IMAGETYPE "png24" | |
NAME "MS" | |
RESOLUTION 96 | |
PIXELADJUSTMENT 0 | |
SHAPEPATH "C:\\IntraMaps\Data\Stonnington" | |
SIZE 940 1207 |
This file contains hidden or 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
MAP | |
... | |
SHAPEPATH "C:\\IntraMaps\Data\Stonnington" | |
SIZE 940 1207 | |
STATUS ON | |
SYMBOLSET "C:\\Program Files (x86)\\MapManager20\\templates\\symbols.sym" | |
UNITS METERS | |
... | |
LAYER | |
DATA PROPERTY_VIEW |
This file contains hidden or 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
with distance_cte AS | |
( | |
SELECT | |
pv.PFI AS pr_view_pfi, | |
tr.PFI AS tr_pfi, | |
pv.SP_GEOMETRY.STDistance(tr.SP_GEOMETRY) AS distance, | |
RANK() OVER (PARTITION BY pv.pfi ORDER BY pv.SP_GEOMETRY.STDistance(tr.SP_GEOMETRY)) AS rank_distance | |
FROM Flux.vmprop.PROPERTY_VIEW AS pv, Flux.vmtrans.TR_ROAD AS tr | |
--WHERE pv.pfi = 173589345 | |
) |
OlderNewer