snap is allowed. If snapping a feature would result in moving the point greater than the
tolerance distance then the snap does not take place and the original unsnapped point is
written to the output dataset. This snap tolerance allows you to control whether only small
snaps are allowed (thereby just tweaking an existing dataset) or to snap all the features by
setting the tolerance to a large number.
Note that the larger the tolerance value, the longer it will take to process each record
(becausethealgorithm must search through a greater number offeatures within that tolerance
radius to nd the closest one). So if you are concerned about processing time a good strategy
is to set the tolerance no larger than it really needs to be. For instance, if you know that
there are no points greater than about 2500m from a line, then setting the tolerance to 3000
will accomplish the same thing as setting it to 10000, but it will do so more quickly.
It is recommended that you specify a new dataset as the output dataset. Although you
can specify an existing dataset, you must ensure that any elds having the same name in
both the input point dataset and the output dataset are of the same type.
An additional eld (SNAPDST) is added to the output dataset that records the distance
the point was moved. If the point was not moved then this eld records a value of -999
(NoData). If a eld SNAPDST already exists (because it was already in the input point
attribute table, perhaps as a result of using the snappoints command previously) then the
algorithm will nd a new unique SNAPDST eld by adding a number to the end (1, 2, ...)
until it nds a unique name.
Syntax
snappoints(in, snap, out, tol, [where]);
in
the input point data source
snap
the input feature source to which points are snapped
out
the output point data source
tol
the maximum snap distance in coordinate system units
[where] the selection statement that will be applied to the point feature data
source to identify a subset of points to process (see full Help documen-
tation for further details)
Example
snappoints(in="C:ndatanlocs.shp", snap="C:ndatanroads.shp",
out="C:ndatansnappedlocs.shp", tol=5000);
snappoints(in="C:ndatanlocs.shp", snap="C:ndatanlakes.shp",
out="C:ndatanshorepnts.shp", tol=250);
3.112 splitdataset
Split Dataset: Splits a vector dataset into several separate datasets based on an ID value
in one of the attribute elds.
141
Pdf metadata extract - add, remove, update PDF metadata in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Allow C# Developers to Read, Add, Edit, Update and Delete PDF Metadata
change pdf metadata creation date; acrobat pdf additional metadata
Pdf metadata extract - VB.NET PDF metadata library: add, remove, update PDF metadata in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Enable VB.NET Users to Read, Write, Edit, Delete and Update PDF Document Metadata
pdf metadata viewer online; pdf metadata editor
Description
This command writes the features and attribute table from a vector data source (a shapele
or geodatabase) and creates multiple new vector data sources based on an ID eld that
contains unique ID’s for each of the new datasets you wish to create. Typically these unique
ID values will be integers, although text ID elds are also acceptable.
The new output can be a geodatabase, or even a new feature dataset within a new or
existing geodatabase. See the section on ’Working with geodatabases’ for further details.
GME has been designed to avoid the problem of having to split datasets. Many of the
vector commands support the ’where’ clause, which allows you to process a subset offeatures.
It is highly recommended that you learn about the ’where’ clause as it is one of the more
powerful aspects of GME. See the ’Strategic commands’ section and the ’where’ section for
further details.
Syntax
splitdataset(in, uideld, outws, prex);
in
the input feature data source
uideld the unique ID eld of the input feature data source
outws
the output workspace, which can either be a folder or a geodatabase (if
a geodatabase, it must end with an exclamation mark - see full Help
documentation for further details)
prex
the prex to use when naming the new feature data sources (the unique
value is appended to the prex)
Example
splitdataset(in="C:ndatanroads.shp", uideld="ROADTYPE",
outws="C:ndatanroadgdb!bytype!", prex="RDTYPE");
splitdataset(in="C:ndatantelemetry.shp", uideld="ANID", outws="C:ndatananimals",
prex="ANIM");
3.113 sumlinelengthsinpolys
Sum Line Lengths In Polygons: Sums the lengths of the portions of all lines that intersect
each polygon.
Description
This tool sums the lengths of the portions of all lines in the specied line data source that
intersect each polygon in the polygon data source, and writes the result to a new eld in the
polygon attribute table. You may optionally also specify a weight eld in the line attribute
table that is used to weight the line lengths: the length of the line intersecting the polygon
is multiplied by the weight value.
142
VB.NET PDF Image Extract Library: Select, copy, paste PDF images
Get image information, such as its location, zonal information, metadata, and so on. Extract image from PDF free in .NET framework application with trial SDK
edit pdf metadata online; delete metadata from pdf
C# PDF Image Extract Library: Select, copy, paste PDF images in C#
information, such as its location, zonal information, metadata, and so on. Able to edit, add, delete, move, and output PDF document image. Extract image from PDF
preview edit pdf metadata; endnote pdf metadata
This can be a computationally intensive program to run with large datasets. In such
cases ensuring that your input data sources have a spatial index built will improve processing
eciency.
Syntax
sumlinelengthsinpolys(line, poly, eld, [weight], [where], [update]);
line
the input line feature source
poly
the input polygon feature source
eld
the output eld name
[weight] the name of the eld in the line attribute table to weight the line lengths
by (default=no weight eld)
[where]
the selection statement that will be applied to the polygon feature data
source to identify a subset of polygons to process (see full Help documen-
tation for further details)
[update] (TRUE/FALSE) if TRUE and you specify an existing eld, the exist-
ing eld will be updated rather than generating an error message (de-
fault=FALSE); warning: this option will result in overwriting of existing
data and is therefore potentially dangerous.
Example
sumlinelengthsinpolys(line="C:ndatanroads.shp", poly="C:ndatancounties.shp",
eld="ROADLENGTH");
sumlinelengthsinpolys(line="C:ndatanroots.shp", poly="C:ndatanplots.shp",
eld="LINESUM", weight="WIDTH");
3.114 system
Execute System Command: Executes a system command via a command prompt.
Description
This command executes asystem command via the command prompt. Like the r() command,
the system() command is dierent from most other GME commands in that it takes the
text within the parentheses and executes it directly, without any interpretation of the text.
For this reason you should not enclose the command text within quotes: write the system
commands here exactly as you would write them at the command prompt. This command
waits for the command to nish before continuing, but performs no checks regarding the
success or failure of the execution of the system command.
It is recommended that for all but the simplest system commands that you call a batch
le.
143
C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net
|. Home ›› XDoc.PDF ›› C# PDF: Extract, Copy and Paste PDF Pages. C#.NET Sample Code: Extract PDF Pages and Save into a New PDF File in C#.NET.
adding metadata to pdf files; pdf xmp metadata editor
VB.NET PDF Library SDK to view, edit, convert, process PDF file
Feel free to define text or images on PDF document and extract accordingly. Multiple metadata types of PDF file can be easily added and processed.
batch update pdf metadata; remove metadata from pdf
Syntax
system(command);
command System command to be executed (not in quotes)
Example
system(notepad.exe);
system(notepad.exe "C:ndataninstructions.txt");
system(C:ndatanscript.bat);
3.115 timer
Command Timer: Switches on or o the command timing utility that reports the process-
ing time for each command in the output window.
Description
For planning and scheduling purposes it is sometimes useful to know how long it takes to run
commands on your datasets. Although timing data is always recorded and viewable in the
GME File { Command History interface, this command will also report timing data directly
in the output window (this creates a more permanent timing record that you can view even
after closing GME, whereas the Command History data will be lost when GME closes).
The timer in no way consumes processing power or slows down processing. The reported
times are only accurate to within 1 second, so the timer is not useful for timing commands
that run very quickly.
Syntax
timer(on);
on (TRUE/FALSE) if TRUE, processing times are reported for most com-
mands
Example
timer(on=TRUE);
timer(on=FALSE);
3.116 uniquevalues
Unique Values: Reports the unique values for a specied eld in an attribute table.
144
C# PDF Text Extract Library: extract text content from PDF file in
XDoc.PDF ›› C# PDF: Extract PDF Text. C# PDF - Extract Text from PDF in C#.NET. Feel Free to Extract Text from PDF Page, Page Region or the Whole PDF File.
clean pdf metadata; remove metadata from pdf file
VB.NET PDF Text Extract Library: extract text content from PDF
PDF ›› VB.NET PDF: Extract PDF Text. VB.NET PDF - Extract Text from PDF Using VB. How to Extract Text from PDF with VB.NET Sample Codes in .NET Application.
remove metadata from pdf online; pdf metadata reader
Description
This command generates a sorted list of unique values for a specied eld in an attribute
table. If the optional parameter ’rformat’ is set to TRUE then the list is reported using
Rsyntax so that the result can be copied and pasted into R, thereby creating a vector in
Rthat contains the unique values. If the optional variablename parameter is specied, a
GME variable is also created containing the unique values (this is useful for scripting and
automation in GME).
Syntax
uniquevalues(in, eld, [rformat], [where], [variablename]);
in
the input vector feature source
eld
the eld name to process
[rformat]
(TRUE/FALSE) writes the output as in R vector format (de-
fault=FALSE)
[where]
the selection statement that will be applied to the feature data source to
identify a subset of features to process (see full Help documentation for
further details)
[variablename] if specied, a GME variable containing the unique values is created
Example
uniquevalues(in="C:ndatanroads.shp", eld="ROADNAME");
uniquevalues(in="C:ndatancountries.shp", eld="COUNTRYNAME",
variablename="countries");
uniquevalues(in="C:ndatantelemetry.shp", eld="ANIMALID", rformat=TRUE);
145
VB.NET PDF Form Data Read library: extract form data from PDF in
Data: Read, Extract Field Data. |. Home ›› XDoc.PDF ›› VB.NET PDF: Read, Extract Field Data. VB.NET PDF - Read and Extract Field Data in VB.NET.
remove pdf metadata; add metadata to pdf
C# PDF Library SDK to view, edit, convert, process PDF file for C#
Feel free to define text or images on PDF document and extract accordingly. Multiple metadata types of PDF file can be easily added and processed in C#.NET
change pdf metadata; read pdf metadata
4 SPATIAL ANALYSIS AND MODELLING TOPICS
4.1 Creating binary and weighted polygon adjecency matrices based
on shared borders
Purpose and method
Adjacency matrices are useful for incorporating spatial relationships among features (in this
case polygons) into models and statistical analyses. An adjacency matrix simply denes
which polygons are adjacent to one another. It can take the form of a binary (1/0) variable,
where 1 indicates the polygons touch and 0 indicates they do not, or the matrix can consist
of continuous values that quantify not only whether two polygons touch, but how much they
touch based on the length of the shared border between them. Here, I describe how to create
both of these matrices and save them as R objects.
The starting point is polygon layer. In this example the polygons depict administrative
districts. The assumption is that the polygons do not overlap substantially, although this
procedure is tolerant ofsmall amounts of spatial inaccuarcy that might result in slight overlap
of polygons along boundaries, or slight gaps between polygons that we would really like to
think of as adjacent.
If your polygon layer contains multiple, disjunct polygons that represent the same feature,
you should run the ArcGIS dissolve command to ensure that these are presented as multipart
features, not separate polygons. Let me explain that with an example. One of the districts
in my example is bisected by a large river, and as a result the district consists of two disjunct
polygons. For my application I wish to quantify adjaceny at the district level and it is not
important to consider ner-scale nuances in adjancency that might be caused by component
polygons. This is a judgement decision you need to make for your application. What you
need to run this analysis is, therefore, a polygon layer that contain exactly one polygon (but
it can be a multipart polygon) per level of your variable of interest. So my polygon layer
contains exactly one polygon (one record in the table) per district ID.
The rst step is to run the GME calc.sharedborders command on the polygon layer. It
requires that we have a unique identier eld.
setwd(all=”C:ndatancanadanprovinces”);
calc.sharedborders(in=”quebec
districts.shp”, uidfield=”CDID”, out=”qcd
sharedborders.shp”,
tol=5);
The ’tol’ (tolerance) parameters is what gives us some lee-way with inaccuracy in the
spatial borders, and it is specied in units of the coordinate system of the data (meters in
my example). Typically a value in the range of 1-10 m will be about right, and will have
negligable in uence on the quantication of adjacency.
Once that is nished, we load the relevant data into GME’s R session.
r.loaddata(in=”quebec
districts.shp”, fields=c(”CDID”));
r.loaddata(in=”qcd
sharedborders.shp”, fields=c(”SRCUID”,”NEIGHUID”,”LENGTH”));
146
Finally, we run an R script to construct and save the matrices. Save the next block of
code as a text le (such as adj.txt), and change the rst few lines to match your data if
you need to. You will probably only need to change the name of the unique ID eld (the id
variable), and possibly the le names at the end of the script.
#change these variables to match your data
id <- CDID
v1 <- SRCUID
v2 <- NEIGHUID
v3 <- LENGTH
n<-length(id)
#create length of shared border matrix (lsbm)
lsbm <- matrix(0, nrow=n, ncol=n)
for (i in 1:length(v1))f
lsbm[which(id==v1[i]),which(id==v2[i])] <- v3[i]
lsbm[which(id==v2[i]),which(id==v1[i])] <- v3[i]
g
#create binary adjaceny matrix (bam)
bam <- matrix(0, nrow=n, ncol=n)
for (i in 1:length(v1))f
bam[which(id==v1[i]),which(id==v2[i])] <- 1
bam[which(id==v2[i]),which(id==v1[i])] <- 1
g
#save these objects so they can be accessed from other R sessions
save(lsbm, file=”lsbm.r”)
save(bam, file=”bam.r”)
save(id, file=”amid.r”)
Once you have saved that as a text le, you need to run it from GME.
r(setwd(”C:nndatanncanadannprovinces”));
r(source(”adj.txt”));
Check in your working directory to make sure the les exist. To use them in any other R
session you can load them using these R commands:
setwd(”C:nndatanncanadannprovinces”)
load(”amid.r”)
load(”lsbm.r”)
load(”bam.r”)
Note that we needed to save the id vector so that we know which polygon ID corresponds
to which matrix row and column. The matrices will be symmetric. A convenient way of
inspecting these matrices is with the R image command.
image(bam)
image(lsbm)
147
5 APPENDIX
5.1 Specifying colours in R
There are a number of ways of specifying colours in R, but one of the most inuitive is to
simply specify the name of the colour. There are several hundred pre-dened colours in R
that you can choose from (see the gures below). Note that the names are spelling and case
sensitive. While the grey-scale colours support both international and U.S. spelling (grey
and gray respectively), some of the colours do not so particular care must be taken to use
the spelling provided (e.g. darkslategray1-4, slategray1-4).
148
white
aliceblue
antiquewhite
antiquewhite1
antiquewhite2
antiquewhite3
antiquewhite4
aquamarine
aquamarine1
aquamarine2
aquamarine3
aquamarine4
azure
azure1
azure2
azure3
azure4
beige
bisque
bisque1
bisque2
bisque3
bisque4
black
blanchedalmond
blue
blue1
blue2
blue3
blue4
blueviolet
brown
brown1
brown2
brown3
brown4
burlywood
burlywood1
burlywood2
burlywood3
burlywood4
cadetblue
cadetblue1
cadetblue2
cadetblue3
cadetblue4
chartreuse
chartreuse1
chartreuse2
chartreuse3
chartreuse4
chocolate
chocolate1
chocolate2
chocolate3
chocolate4
coral
coral1
coral2
coral3
coral4
cornflowerblue
cornsilk
cornsilk1
cornsilk2
cornsilk3
cornsilk4
cyan
cyan1
cyan2
cyan3
cyan4
darkblue
darkcyan
darkgoldenrod
darkgoldenrod1
darkgoldenrod2
darkgoldenrod3
darkgoldenrod4
darkgray
darkgreen
darkgrey
darkkhaki
darkmagenta
darkolivegreen
darkolivegreen1
darkolivegreen2
darkolivegreen3
darkolivegreen4
darkorange
darkorange1
darkorange2
darkorange3
darkorange4
darkorchid
darkorchid1
darkorchid2
darkorchid3
darkorchid4
darkred
darksalmon
darkseagreen
darkseagreen1
darkseagreen2
darkseagreen3
darkseagreen4
darkslateblue
darkslategray
darkslategray1
darkslategray2
darkslategray3
darkslategray4
darkslategrey
darkturquoise
darkviolet
deeppink
deeppink1
deeppink2
deeppink3
deeppink4
deepskyblue
deepskyblue1
deepskyblue2
deepskyblue3
deepskyblue4
dimgray
dimgrey
dodgerblue
dodgerblue1
dodgerblue2
dodgerblue3
dodgerblue4
firebrick
firebrick1
firebrick2
firebrick3
firebrick4
floralwhite
forestgreen
gainsboro
ghostwhite
gold
gold1
gold2
gold3
gold4
goldenrod
goldenrod1
goldenrod2
goldenrod3
goldenrod4
gray
gray0
gray1
gray2
gray3
gray4
gray5
gray6
gray7
gray8
gray9
gray10
gray11
gray12
gray13
gray14
gray15
gray16
gray17
gray18
gray19
gray20
gray21
gray22
gray23
gray24
gray25
gray26
gray27
gray28
gray29
gray30
gray31
gray32
gray33
gray34
gray35
gray36
gray37
gray38
gray39
gray40
gray41
gray42
gray43
gray44
gray45
gray46
gray47
gray48
gray49
gray50
gray51
gray52
gray53
gray54
gray55
gray56
gray57
gray58
gray59
gray60
gray61
gray62
gray63
gray64
gray65
gray66
gray67
gray68
gray69
gray70
gray71
gray72
gray73
gray74
gray75
gray76
gray77
gray78
gray79
gray80
gray81
gray82
gray83
gray84
gray85
gray86
gray87
gray88
gray89
gray90
gray91
gray92
gray93
gray94
gray95
gray96
gray97
gray98
gray99
gray100
green
green1
green2
green3
green4
greenyellow
grey
grey0
grey1
grey2
grey3
grey4
grey5
grey6
grey7
grey8
grey9
grey10
grey11
grey12
grey13
grey14
grey15
grey16
grey17
grey18
grey19
grey20
grey21
grey22
grey23
grey24
grey25
grey26
grey27
grey28
grey29
grey30
grey31
grey32
grey33
grey34
grey35
grey36
grey37
grey38
grey39
grey40
grey41
grey42
grey43
grey44
grey45
grey46
grey47
grey48
grey49
grey50
grey51
grey52
grey53
grey54
grey55
grey56
grey57
grey58
grey59
grey60
grey61
grey62
grey63
grey64
grey65
grey66
grey67
grey68
grey69
Figure 3: R colour names (part 1 of 2)
149
grey70
grey71
grey72
grey73
grey74
grey75
grey76
grey77
grey78
grey79
grey80
grey81
grey82
grey83
grey84
grey85
grey86
grey87
grey88
grey89
grey90
grey91
grey92
grey93
grey94
grey95
grey96
grey97
grey98
grey99
grey100
honeydew
honeydew1
honeydew2
honeydew3
honeydew4
hotpink
hotpink1
hotpink2
hotpink3
hotpink4
indianred
indianred1
indianred2
indianred3
indianred4
ivory
ivory1
ivory2
ivory3
ivory4
khaki
khaki1
khaki2
khaki3
khaki4
lavender
lavenderblush
lavenderblush1
lavenderblush2
lavenderblush3
lavenderblush4
lawngreen
lemonchiffon
lemonchiffon1
lemonchiffon2
lemonchiffon3
lemonchiffon4
lightblue
lightblue1
lightblue2
lightblue3
lightblue4
lightcoral
lightcyan
lightcyan1
lightcyan2
lightcyan3
lightcyan4
lightgoldenrod
lightgoldenrod1
lightgoldenrod2
lightgoldenrod3
lightgoldenrod4
lightgoldenrodyellow
lightgray
lightgreen
lightgrey
lightpink
lightpink1
lightpink2
lightpink3
lightpink4
lightsalmon
lightsalmon1
lightsalmon2
lightsalmon3
lightsalmon4
lightseagreen
lightskyblue
lightskyblue1
lightskyblue2
lightskyblue3
lightskyblue4
lightslateblue
lightslategray
lightslategrey
lightsteelblue
lightsteelblue1
lightsteelblue2
lightsteelblue3
lightsteelblue4
lightyellow
lightyellow1
lightyellow2
lightyellow3
lightyellow4
limegreen
linen
magenta
magenta1
magenta2
magenta3
magenta4
maroon
maroon1
maroon2
maroon3
maroon4
mediumaquamarine
mediumblue
mediumorchid
mediumorchid1
mediumorchid2
mediumorchid3
mediumorchid4
mediumpurple
mediumpurple1
mediumpurple2
mediumpurple3
mediumpurple4
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
midnightblue
mintcream
mistyrose
mistyrose1
mistyrose2
mistyrose3
mistyrose4
moccasin
navajowhite
navajowhite1
navajowhite2
navajowhite3
navajowhite4
navy
navyblue
oldlace
olivedrab
olivedrab1
olivedrab2
olivedrab3
olivedrab4
orange
orange1
orange2
orange3
orange4
orangered
orangered1
orangered2
orangered3
orangered4
orchid
orchid1
orchid2
orchid3
orchid4
palegoldenrod
palegreen
palegreen1
palegreen2
palegreen3
palegreen4
paleturquoise
paleturquoise1
paleturquoise2
paleturquoise3
paleturquoise4
palevioletred
palevioletred1
palevioletred2
palevioletred3
palevioletred4
papayawhip
peachpuff
peachpuff1
peachpuff2
peachpuff3
peachpuff4
peru
pink
pink1
pink2
pink3
pink4
plum
plum1
plum2
plum3
plum4
powderblue
purple
purple1
purple2
purple3
purple4
red
red1
red2
red3
red4
rosybrown
rosybrown1
rosybrown2
rosybrown3
rosybrown4
royalblue
royalblue1
royalblue2
royalblue3
royalblue4
saddlebrown
salmon
salmon1
salmon2
salmon3
salmon4
sandybrown
seagreen
seagreen1
seagreen2
seagreen3
seagreen4
seashell
seashell1
seashell2
seashell3
seashell4
sienna
sienna1
sienna2
sienna3
sienna4
skyblue
skyblue1
skyblue2
skyblue3
skyblue4
slateblue
slateblue1
slateblue2
slateblue3
slateblue4
slategray
slategray1
slategray2
slategray3
slategray4
slategrey
snow
snow1
snow2
snow3
snow4
springgreen
springgreen1
springgreen2
springgreen3
springgreen4
steelblue
steelblue1
steelblue2
steelblue3
steelblue4
tan
tan1
tan2
tan3
tan4
thistle
thistle1
thistle2
thistle3
thistle4
tomato
tomato1
tomato2
tomato3
tomato4
turquoise
turquoise1
turquoise2
turquoise3
turquoise4
violet
violetred
violetred1
violetred2
violetred3
violetred4
wheat
wheat1
wheat2
wheat3
wheat4
whitesmoke
yellow
yellow1
yellow2
yellow3
yellow4
yellowgreen
Figure 4: R colour names (part 2 of 2)
150
Documents you may be interested
Documents you may be interested