►
From YouTube: Entity Framework Community Standup - Sept 30th 2020 - Geographic Data with NetTopologySuite
Description
Joe Amenta joins us to discuss how to add spatial data to your applications to open a world of new relationships between data. He will demonstrate the "status quote" for querying spatial data from .NET Core and demo integrations with NetTopologSuite and EF Core.
Community Links: https://www.theurlist.com/efcore-standup-2020-09-30
Featuring: Joe Amenta (@airbreather)
#GeoData #EFCore
A
A
A
A
Hey
so
welcome
to
the
ef
community
stand
up,
I'm
arthur,
I'm
the
engineering
manager
on
a
new
framework.
We
don't
have
jeremy,
our
pm
a
normal
producer,
for
this
show
right
now,
so
I'm
going
to
try
and
wing
it
on
my
own
and
we'll
see
how
it
goes.
So,
if
things
don't
look
as
smooth
as
normal,
that's
why
before
we
before
we
go
let's
before
we
get
started,
let's
have
an
introduction
to
you
know
the
people
we
have
here
so
regular
member
of
the
team
bryce
samson's
here
bryce.
B
Howdy,
I'm
bryce
been
on
the
team
for
10
years
as
a
developer,
and
I
worked
on
the
spatial
feature
during
ef
core
2.2.
A
And
we
have
joe
here,
who
is
one
of
the
developers
on
net
topology
suite
who
is
going
to
show
us
about
everything
spatial
today,
joe,
you
want
to
introduce
yourself
a
bit
hi.
C
My
name
is
joe
amenta.
I've
been
a
developer
for
about
10
years
now,
and
most
of
that
time
has
been
working
with
either
jts
or
nts
and
so
kind
of
a
kind
of
the
one
of
the
people
to
talk
about
this.
So
I'm
thank
you
for
having
me
one
thing
to
point
out.
I
work
for
a
company
called
urban
science
and
nothing
nothing
on
this
stream
has
anything
to
do
with
urban
science.
So
just
for
legal
reasons,
I
should
probably
say
that.
A
Okay,
fair
enough,
okay,
so
we
may
have
other
people
on
the
from
the
team
drop
in
as
we
go,
but
they
can
introduce
themselves
when
they
do
I'm
going
to
just
share
some
links
now.
So
let
me
do
this
right
see.
Did
that
work,
I
can't
tell
yes,
okay,
so
people
can
see
see
these
links
now.
A
I
really
should
have
another
monitor
set
up
here.
Okay,
so
we
have
a
few
links
today,
I'm
going
to
go
through
them
quickly,
because
I
want
to
give
joe
as
much
time
as
possible.
The
first
one
is
something
from
our
very
own
jeremy,
where
he
shows
how
to
build,
link,
queries
and
then
use
the
expression
tree
to
send
them
and
execute
them
remotely
this.
This
is
pretty
cool.
A
I'm
not
gonna
talk
about
it
too
much,
because
I
think
it'd
be
better
for
for
jeremy
to
talk
about
it
when,
when
he's
back
on
the
show,
but
definitely
have
a
look
at
that,
look
at
that-
that's
some
pretty
pretty
exciting
stuff
there.
Then
we
have
a
link
to
the
stuff
we're
going
to
talk
to
today.
So
we
have
some
links
to
the
net
topology
suite
repo
on
github.
This
is
where
all
of
their
work
is
done
and
we
have
a
link
here
to
documentation.
A
C
A
So
I
was
inspired
by
the
java
technology
suite
jts
and
there's
a
link
here
for
more
information
about
that,
and
then,
let's
want
to
also
call
out
that
we've
released
microsoft
data
sql
lite.
We
released
that
at
the
same
time
as
ef
core,
but
it
usually
doesn't
get
much
press
because
we
talk
about
the
f
core,
so
bryce
has
written
a
good
blog
here.
That
shows
a
bunch
of
the
changes
that
we've
done
in
sql
lite
for
five.
Oh,
you
wanna
talk
about
that
briefly.
Bryce.
B
Yeah
I
wanna
give
a
huge
thanks
to
the
contributors
I
mean,
I
think,
they're,
the
only
people
that
added
features
this
release,
I
wrote
a
bunch
of
documentation
and
then
they
sort
of
optimized
these
get
bytes
and
get
characters
to
stream
more
so
it
uses
less
memory
and
then
yeah.
Just
a
bug
fix
around
the
explain
statement
and
then
add
support
for
deferred
transactions,
which
can
give
you
more
concurrency
to
the
database
and
then,
of
course,
our
dependencies
updated.
Eric
sync
manages
the
sqlite
pcl
raw.
He
did
some
goodness
there.
B
He
had
a
contribution
again
community's
huge
contributors.
Here
he
had
a
contribution
to
enable
mips,
64
linux
architecture
and
then,
of
course,
another
cascade
as
we
updated.
The
sql
lite
version
that
we
shipped
with
in
the
box,
and
it
had
some
goodness
around
generated
columns
which
lights
up
in
energy
framework
core
and
then
some
other
goodness.
A
Good
stuff,
so
I
put
the
link
up
on
the
screen,
so
you
can
go
and
check
out
any
of
those
things
and
I
think
now
we'll
just
pass
it
over
to
joe
and
and
have
him
share
what
he
has
to
share
with
us.
D
C
Up
a
little
bit
joe
sure,
I
think.
C
What
I
have
are
a
bunch
of
parks
and
a
bunch
of
cafes,
and
what
I've
done
is
I've
grabbed
these
from
openstreetmap
by
extracting
from
a
specific
key,
and
so
when
you
have
parks
and
cafes,
sometimes
you
have
parks
that
have
cafes
inside
of
them
and
so
with
a
traditional
kind
of
relationship,
I'm
using
sql
server
for
linux
and
some
stuff
to
make
it.
So
I
don't
have
to
pluralize
table
names,
and
so
I
can
access
data
as
json,
but
the
long
story
short.
We
have
a
traditional
relationship
of
here's
for
every
park.
C
We
have
a
bunch
of
cafes
that
are
in
it
and
for
every
cafe.
It
has
one
or
zero
containing
park.
Everything
else
is
pretty
straightforward.
We
have
the
cafe
id,
I
don't
generate
a
key
for
it,
because
the
ids
I'm
using
openstreetmaps
ids
and
then
we
just
have
a
bunch
of
completely
unstructured
data
from
openstreetmap,
just
whatever
the
contributor
happened
to
give
us,
and
so
I'm
using.net
five
release.
Can
the
first
release
candidate.
C
Excuse
me,
nice
and
then,
as
we
go
on
we're
going
to
be
adding
some
net
topology
suite
nts
stuff
to
it.
My
first.
A
C
Is
going
to
show
for
each
cafe
that
has
a
containing
park
select
just
that
cafe
and
there's
a
navigation
property
to
the
park,
and
I
have
a
database
that
I'm
going
to
set
up
right.
B
C
A
C
I'm
going
to
show
keep
going
and
ignore
me,
so
what
we
have
so
far
is
just
a
simple
relation
of
for
each
cafe.
We
have
one
or
zero
parks
that
contain
it,
and
this
wonderful
containing
park
park
id
column,
and
so
when
I
go
ahead
and
I'm
gonna
actually
load
this
data,
I
don't
have
any
migrations
for
data
loading.
I
just
have
this
fun
little
thing.
Where
once
I,
if
true,
then
I
will.
B
Awesome
and
then
you
have
that
what
was
that
is
that
the
sql,
oh,
I
forget
the
name
of
that.
This.
C
A
A
Yeah
I
I
should
try
that
I
haven't.
I
tried
the
the
the
tool
that
when
it
first
came
out,
but
it
looks
like
it's
got
some
some
better
functionality
now,
so
it's
pretty
cool.
C
That's
a
real
it's
a
real
tool.
Now
I
personally,
I
still
prefer
sql
server
management
studio
on
windows,
but
I
I
have
a
linux
machine
at
home,
and
so
I
figured
what
the
heck
yep
so
the
first
thing
that
I've
got
is
oh.
I
should
also
point
out
that
in
my
model
I
do
have
it
set
to
we're
going
to
log
everything
that
this
does
to
the
console
so
that
you
can
see
the
sql
that
ef
runs.
A
C
We
make
the
initial
the
initial
data
load,
which
I've
just
commented
this
to.
If
true.
C
If
false
now
for
future
loads
or
future
runs,
we
now
have
a
bunch
of
things
in
our.
I
should
probably
take
this
drop
database
thing
out,
so
I
don't
accidentally
run
that
select
count.
One
from
cafe
select
count
one
from
park,
so
just
to
show
we
have
767
cafes
and
4156
parks.
These
are
just
the
cafes
and
parks
in
michigan,
which
is
my
home
state.
C
We
have
a
few
cafes
that
are
in
parks.
This
cafe,
with
all
of
its
tags,
is
in
this
park.
C
This
cafe
is
in
this
park
and
then
this
you
know,
I
think,
there's
about
this
park
is
this
park
actually
has
three
cafes,
so
I
think
there
are
four
parks
that
have
cafes
inside
of
them,
and
now
we
come
to
the
problem
with
these
kinds
of
traditional
relationships,
I
had
to
say
for
every
park
or
sorry
for
every
cafe.
Is
there
a
park
inside
that
it's
within?
C
If
so,
then
I
have
to
put
the
then
I
have
to
say
that
this
cafe
is
in
this
park.
This
cafe
is
in
that
park.
That
is
very,
very
tedious
and
it
doesn't
scale
what
if
I
had
football
fields,
what
if
I
had
little
shops?
What,
if
I
had
golf
courses,
all
these
things
create
an
explosion
of
relationships.
This
kind
of
model
is
just
not
not
going
to
work
at
the
at
best.
C
A
Yes,
so
maybe
we
should
talk
about
that
a
little
bit,
because
I
think
it's
it's
it's
it's
relevant
to
how
spatial
and
ef
core
interact
like
you're
showing
here
so
so,
for
example,
if
you
go
back
to
ef6,
we
had
spatial
support
in
the
f6,
but
it
was
very
tied
to
the
specific
sql
server
implementation
of
spatial.
A
So
when
we
were
doing
ef
core,
we
wouldn't
want
to
do
that.
We
wanted
to
have
something
that
could
be
used:
cross-platform
across
databases,
so
not
tied
to
windows,
not
tied
to
sql
server
and
that's
yes,
the
sql
geography
class,
that's
the
that's!
A
The
the
sql
server,
basically
specific
type
reflected
into
a
windows,
only.net
type,
and
so
we
didn't
want
to
to
want
to
use
that
and
that's
basically,
why
bryce,
I
think,
did
it
did
a
lot
of
research
and
also
shy
had
done
similar
research,
and
we
came
to
the
conclusion
that
nts
net
topology
suite
was
a
great
way
to
represent
data.
So,
given
that
what
what
we
tried
to
do
with
ef
is
really
nothing
more
than
connect
the
the
server
specific
date,
sql
spatial
support
with
the
cross
platform
cross.
A
You
know
net
core
nts
support
for
spatial,
so
that
you
could
use
those
two
things
together
and
get
spatial
from
databases
and
use
them
in
nts
and
get
spatial
data
represented
in
nts
and
save
into
databases,
and
do
all
that
query.
So
that's
why
each
provider
has
like
a
separate
package,
because
it's
like
specific
to
tie
nts
into
that
package,
but
in
reality,
most
of
the
work
you
actually
do
with
spatial
will
be
the
same
across
providers
because
you're
just
dealing
with
nts
and
ef.
So
it's
a
pretty
nice
model
postgres
has
support.
A
Sql
server
has
support
lawrence
on
the
pomelo.
My
sequel,
who
I
see
is
in
in
the
in
the
comments
here.
He
added
support
to
for
my
sequel
and
the
pomelo
provider
recently
seems
to
be
working.
Well,
I
think
bryce
you,
you
may
know,
there's
some
other,
there's,
probably
other
less
known
providers.
Have
it
too
sqlite,
of
course.
B
A
So,
let's,
let's
go
back
over
to
joe,
but
just
wanted
to
kind
of
tie
those
things
together
for
people.
C
Sure,
no,
that's
a
that's
a
really
big
call
out,
because
I
mean
nts
works
on
any
platform
that
supports
dot
net
standard
2.0.
So
your
dotnet
framework,
four
point,
I
would
say
4.7.2
or
higher
your
mono.
I
think
and
uwp
every
platform
can
do
this.
You
see
I'm
running
linux.
So
even
if
I
didn't
have
sql
server
running
natively
on
linux,
I
could
still
connect
to
a
sql
server
database
through
my
through
linux,
to
any
sql
server
database
and
use
the
same
code
everywhere.
C
Pretty
awesome.
The
only
things
you
have
to
worry
about
are
the
very
few
provider
specific
things
and
I
go
through
one
of
them
later
in
this
demo
cool.
So
I've
turned
on
that
topology
suite
sql
server
integration,
I'm
referencing
that
topology
suite
directly
just
to
show
you
the
package
reference
line
for
this
and
then
there's
a
geo
json
this.
I
I
use
this
just
for
data
loading
because
I
have
I
need
to
actually
add
the
data
to
my
tables
and
I
don't
have
a
fancy
migration
for
that.
C
So
how
am
I
going
to
add
this
to
my
model?
So
first
I'm
using
sql
server
and
when
I
tell
it
to
use
sql
server,
it
doesn't
know
natively
that
it
has
to
use
net
topologies
how
to
map
with
net
topology
suite.
So
I
go
sql
server
in
my
on
configuring
method,
sql,
server
options
and
just
straight
up
use,
not
topology
suite.
I
should
probably
have
done
a
restore
so
that
we
can
actually
see
the
intellisense.
C
C
Suite
and
we
can
go
to
the
decompilation
and
find
oh
here's,
this
fancy
extension
and
we
can
really
dig
into
the
whole
thing
about
how
that
got
implemented
as
a
something
that's
separate
from
sql
server
core,
but
an
extension
that
lets
it
still
talk
with
nts,
okay.
So
now
that
we're
using
net
topology
suite
just
because
it's
available
doesn't
mean
we're
using
anything
for
it.
So
first
first
thing
to
do
is:
let's
get
rid
of
this?
Not
scalable,
cafes,
property.
Let's
get
rid
of
this
containing
park
property.
C
So
the
what
we
do
is,
let's
say:
geometry
using
that
topology
suite
dot
geometries
park,
geography
I'll
get
to
that
in
a
bit.
C
So
in
order
to
add
just
a
geography
that
describes
the
area
that
each
cafe
or
each
park
takes
up
in
the
world,
we
need
to
have
a
net
topology,
suite
geometry
type-
and
this
is
one
of
the
weird
things
about
integrating
nts
with
spatial
data
is
that
geometry
in
nts
is
actually
planar.
Just
a
bunch
of
x
y
coordinates
like
like
we've
all
learned
in
high
school,
where
on
point
x
is
zero.
Zero
point
y
is
one
one.
The
distance
is,
you
know,
square
root,
one
one.
Is
it's
a
one
wow,
okay,
so
we've?
C
What
we're
doing
is
we're
mapping
this
to
a
geography
column
which
we'll
see
when
I
do
a
migration
for
this
I'll.
It's
probably
easier.
If
I
just
make
this
and
then
since
we're
querying
by
the
containing
part,
that's
not
going
to
work
anymore.
So
let's
just
comment
that
out.
C
Spatial
okay:
this
may
result
in
the
loss
of
data
and
we
kind
of
hope
it
results
in
the
loss
of
data,
because
that
was
not
scalable
data.
C
C
C
There
are
two
different
types
of
spatial
objects
in
sql
server,
there's
geometry,
which
is
what
actually
net
topology
suite
is
using
when
you
run
it
locally,
but
then
there's
geography
which
is
more
familiar
to
us,
not
so
much
familiarize
like
but
like
useful,
like
hey
on
third
and
fifth
street
there's
this
thing
that
exists.
C
A
We
we
talked
a
lot
about
whether
or
not
we
should
add
geometry
and
geography
top
level
types.
I
don't
know
bryce
do
you
want
to
mention
like
why
we
ultimately
didn't
end
up
doing
that.
B
Yeah,
I
think
sql
server
is
kind
of
the
only
weird
one
that
break
the
two
distinct
types
I
mean
under
the
covers:
they're
they're,
identical
right,
like
they
both
have
like
a
vertical
coordinate
and
a
horizontal,
coordinate
and
and
all
the
same
method.
You
can
still
compute
the
distance
between
two
points,
and
so
I
I
think,
the
the
the
standard
that
all
these
things
are
based
off
is
really
defining
geography
or
geometry.
B
I
get
confused
all
the
time
is
really
defining
a
geometry,
and
it
is
really
weird
on
sql
server
that
you
kind
of
know
that
this
clr
type
can
represent
both
because
at
the
end
of
the
day,
it's
just
a
data
structure
and
the
data
structure
is
identical
either
way
and
the
operations
you
can
perform
on
them
are
identical,
mostly
yeah.
B
B
Yeah
and
we
one
of
the
things
we
really
wanted
with
this
implementation-
was
consistency
across
database
providers.
So,
yes,
it
would
make
a
lot
of
sense
for
sql
server,
but
when
you
go
to
postgres
where
there's
not
really
a
distinction
or
you
go
to
sqlite,
I
feel
like-
and
this
is
one
of
the
mistakes
I
think
we
made
in
ef6-
is
we
made
it
very
sql
server
specific
so
that
when
oracle
tried
to
come
in
and
implement
it
like
half
of
it,
didn't
work,
because
it
didn't
really
make
sense
on
oracle's
implementation.
So.
C
Yeah,
that's
where
we
are
now.
We
have
geography.
We
have
geometry
by
default
because
we
think
it's
the
most.
I
guess
everybody
thinks
it's
the
most
useful
we
map
to
a
geography.
If
you
want
to
change
that
you
can,
I
don't
remember
the
exact
attribute,
but
there's
an
attribute
you
can
put
on
this.
That
says.
Oh,
please,
map
me
to
geometry.
Instead
of
geography.
C
Yeah,
so
I've
got
this.
I've
got
my
migration
it'll
delete
this
unscalable
column
it'll,
create
these
new
scalable.
I
say
scalable
as
in
like.
If
I
had
more
data
types,
we
wouldn't
need
to
add
more
columns
to
this.
So
I'm
going
to
go
ahead
and
update
my
database
dot
net
ef
database
update.
B
C
Exactly
and
so
it's
like
you,
let
the
data
tell
you
how
it's
related,
rather
than
you,
telling
the
data
how
their
relationships
are
set
up.
C
B
Is
there
any
way
to
make
the
text
on
that
window
bigger.
C
C
C
C
C
C
C
And
so
I've
there
it
is,
it
should
all
be
there.
We
should
see
a
bunch
of
0x
e6
or
something
yeah
there.
It
is
so
now
this
is
sort
of
a
blob,
and
this
is
one
thing
that
I
have
to
call
out:
sql
server
management
studio,
for
it
has
a
much
better
way
to
visualize
these
part
geographies.
I
don't
know
if
you
can
tell
where
this
is
by
the
binary
data.
B
That
so
that
data
format-
and
I'm
totally
triggered
by
that.
So
when
we
wanted
to
sort
of
add
spatial
to
net
core,
we
were
blocked
on
the
sql
server
team
for
the
same
reason
as
everyone
else,
this
these
sql
geometry
and
sql
geography,
net
types,
weren't
available,
on.net
core,
and
so
we
had
to
think
really
hard
about.
How
are
we
going
to
bring
this
to.net
core
and
which
is
why
it
took
us
so
long?
B
I
don't
know
if
you'll
be
able
to
find
that,
but
so
it
tells
you
like
what
all
the
bytes
are
and
how
they,
how
they
represent
x
y,
coordinates
or
longitude
latitude
coordinates,
and
so
we
dug
in
and
we
we
actually
implemented
a
stereolizer
and
a
d
deserializer
to
go
from
that
binary
format,
which
is
this.
This
little
project
here,
this
assembly
net
topologysuite.io.sql
server,
bytes.
B
And
so
it
has
that
serialization
and
it
completely
bypasses
those
traditional
sql
geometry
and
sql
geography.net
types,
and
this
is
what
the
like
the
java
provider
would
have
to
do
as
well.
They'd
have
to
go
through
this
binary
format,
so
we
actually
yeah.
We
contributed
this
to
the
net
topology
suite
project
as
part
of
our
spatial
work
and
which
was
really
cool
because
a
few
weeks
later,
maybe
months
later,
the
and
hibernate
people
switched
over
to
using
it,
which
is
awesome.
B
C
A
Great
a
little
oil
side
note
to
that!
That's
if
you
look
if
you
turn
on
sensitive
data
logging,
and
you
see
the
values
that
we're
sending
to
and
from
sql
server
for
spatial
stuff,
you'll
see
that
they're
just
binary
blobs
and
that's
why
that
is
as
well,
because
we
convert
them
to
binary
before
sending
them
down
the
wire.
C
Yeah,
this
is
a
I
I
really
like
the
this
kind
of
work
data
data
formats
and
then
finding
a
way
to
like
map
that,
to
some
add
that
to
something
in
in
a
clr
type.
I
really
love
this
stuff.
C
Okay,
so
it
seems
like
we've
got
our
data
loaded,
yep,
there's
the
0x
e61
bunch
of
bytes.
So
now
let's
actually
go
ahead
and
change
our
model.
Now
that
we've
got
everything
loaded,
I'm
going
to
make
this
no
longer
nullable,
because
I
don't
like
having
to
deal
with
nulls
and
I've
got
the
nullable
c-sharp
9
turned
on,
so
this
is
required
and
this
is
required.
So
I've
made
a
change
to
my
model.
I'm
going
to
make
a
new
migration
to
apply
that
change,
make
spatial.
C
There
we
are,
this
time
it
doesn't
result
in
the
loss
of
data.
We've
got
alter
column,
it
was
nullable.
Now
it's
not.
B
C
Yeah,
so
we're
not
nullable
anymore.
Once
I
apply
that
migration
ef
database
update.
B
C
So
when
I
make
my
model,
I
do
it
very
simply.
I
just
sort
of
make
a
get
set
property
with
c-sharp
8.
It
lets
us
figure
out.
Things
like
hey
is
something
possibly
going
to
be
null
when
I
de-reference
it,
and
when
I
have
a
property
like
this,
the
default
would
have
been
null,
and
so,
if
I
take
this
out
I'll
show
you
what
happens
when
I
take
it
out.
C
A
So
you
probably
don't
want
to
go
off
demo
script
here,
because
you
know
I
wouldn't
recommend
that,
but
but
rather
than
doing
that,
one
thing
you
could
do
is
because
efcor
supports
constructors.
You
could
make
that
actually
a
read-only
property
and
put
a
constructor
in
it
that
sets
it,
and
that
would
also
satisfy
the
nullability,
of
course
that
doesn't
work.
If
you
really
want
it
to
be
immutable
because
you
know,
although
you
could
you,
I
guess
you
could
still
use
the
use.
The
getter
and
setter.
B
B
When
your
data
is
going
to
be
loaded
like
not
by
newing
up
a
class
but
like,
for
instance,
by
a
framework
like
ef
like
that,
property
is
never
going
to
be
null
when
we
pull
something
back
from
the
database,
because
it's
not
available
in
the
database
yeah,
but
the
language
doesn't
know
that
that's
going
to
happen.
So
this
is
just
a
way
of
saying
trust.
Me.
It's
never
going
to
be
null,
even
though
in
theory
you
could
initialize
this
and
it
would
be
null.
C
Yes,
and
so
that,
essentially,
what
that
means
is
I'm
promising
that
when
I
turn,
if
I
were
to
new
up
an
entity
and
then
make
an
update
to
my
data
store,
then
if
I
forgot
to
set
this,
then
it
would,
it
would
fail
at
update
time
rather
than
at
the
time
when
I'm
trying
to
use
it.
C
So
the
compiler
is
not
helping
me
as
much
as
it
would
otherwise,
but
for
the
demo
purposes
we
kind
of
know
what
we're
doing,
and
it's
not
really
a
big
feature
of
this
demo.
B
C
Yeah,
I'm
hoping
that
get
in
it
will
help
with
that,
but
I
guess
we'll
see.
C
Okay,
what
I've
done
is
I've
said
this
was
nullable
and
now
it's
not
so
I've.
I
believe
that
did
I
just
make
that
update.
I
think
I
can
run
this
multiple
times
just
in
case
I
forgot.
C
C
C
For
now,
all
that
I
know
how
to
do
is
to
make
a
cross
join
and
then
do
a
filter
on
it,
which
I
think
sql
server
knows
just
fine,
how
to
do
that.
So,
jo
from
I'm
saying
for
every
cafe
for
every
park.
A
What
exactly
are
the
geography
types
that
you're
using
there
is
is?
Are
they
it
doesn't
make
sense
if
they're
both
points
right
because,
like
you
say
to
say
well
so
so,
the
park
is
defined
as
as
some
boundary
or
some
box,
and
we
we
don't
really
need
to
know
about
that.
We
can
just
use
it.
Abstractly
is
that
kind
of
what
you're,
showing
here
sure.
C
The
actual
geometry
types
are,
in
fact
cafes
has
in
my
cafe:
data
set
there's
actually
two
types
of
geometry,
some
are
points,
and
then
some
are
polygons
that
actually
describe
the
exact
outline
of
the
pattern.
C
Are
always
polygons,
and
so
this
polygon
I'll
in
fact
I'll,
show
you
once
I
do
this
I'll
also
show
you
what
what
these
data,
what
this.
A
C
Actually
looks
like
on
a
source,
so
I'm
going
to
go
ahead
and
say
so,
since
I'm
doing
this
cross
join,
I
no
longer
have
a
way
to
get
to
the
park
from
the
cafe.
So
I'm
going
to
say,
new
anonymous
type
cafe
equals
cafe
and
actually,
since
I'm
only
looking
at
json
data,
let's
kind
of
cheat
and
not
pull
more
stuff
down,
cafe
json
data
and
then
part
json
data,
part.json
data.
C
So
now
I've
got
a
cafes
and
parks
so
for
each
cafe
and
park.
I
don't
need
this
anymore
because
I've
got
them
in
this
anonymous
type.
So
the
cafe
is
cafe
and
park.
C
C
And
I'll
say:
cafe:
number
cafe
id
park
number
cafe
and
park
dot
park
id,
and
so
now
I'm
going
to
see,
hopefully
those
same
parks
that
we
saw
before.
I
think
there
are
four
parks
where
one
had
three
cafes
and
then
we'll
see
all
that
on
this
and
I'm
gonna
since
there's
only
a
few
entries,
I
can
actually
show
you
the
sql
that
was
actually
generated
here.
So
this
is
select
the
cafe
id
the
park
id
cafe,
json
data
and
park
json
data
from
the
cafe.
Here's
that
cross
join.
C
C
B
C
Yeah,
so
I
can
go
over
to
my
database
and
I
can
rerun
that
same
query
just
to
show
you
that
it's
there's
no
magic
here
and
it
takes
a
little
bit
there.
We
are
here's
our
cafe
ids
park
ids
in
the
cafe.
These
should
be
the
same
that
I
had
before.
In
fact,
that's
actually
how
I
generated
those
contains
before
those
direct
relationships,
so
we're
writing.
A
In
the
question
in
the
chat,
is
there
an
intersect
method
that
gives
cafes
that
are
partially
inside
a
park.
C
Yes,
there
is,
and
it
is
as
simple
as
that-
intersects
the
cafe
so
this
will
be,
whereas
contains
says
if
the
cafe
is
fully
contained
within
the
park,
then
contains
returns.
True
with
intersex,
as
if
any,
even
the
tiniest
one
point
of
the
cafe
happens
to
be
park
adjacent,
it
will
return
the
entire
cafe
to
you.
A
Probably
the
same
results
right.
I
hope.
D
C
A
A
cafe
that's
half
inside
a
park.
C
Yes,
this
kind
of
looks
like
the
same
same
exact
results.
We
have
st
intersects
instead
of
st,
contains
there's
a
bunch
of
other
relation
operators
as
well,
so
there's
is
within
distance.
So
is
this
cafe
within
500
meters
of
a
park,
for
example,.
A
So
to
to
answer
the
another
question
in
chat,
so
basically,
yes,
you
can
use
all
of
these
kind
of
spatial
operations
to
understand
the
nature
of
how
your
spatial
types.
Obviously,
on
the
surface
of
the
earth
like
we
like,
we
talked
about
intersect
each
other,
which
is
super
valuable
and
useful,
and
not
easy
to
just
replicate
by
writing.
A
You
know
if
you
try
to
roll
this,
your
own,
you
think,
oh,
I
just
use
x
and
y,
but
as
we
were
explaining
earlier
that,
that's
fine
if
you've,
if
it's
a
euclidean
geometry
and
you
can
just
do
normal
calculations,
but
you
want
to
find
out
if
this
park
intersects.
You
know
if
this
cafe
intersects
this
park
and
it's
on
a
curve
you'll
get
it
wrong
if
you're,
just
trying
to
you
know
hack
it
like
that
so
having
this
stuff
built
into
the
database
is
super
super
useful,
super,
powerful.
C
Now,
having
said
that,
you
still
need
to
know
what
your
data
is
in
order
to
get
get
the
performance
that
I
think
we
would
all
want
from
our
database
and
I'm
going
to
show
a
spatial
index
just
to
sort
of
give
away
the
giveaway
what's
coming
up,
but
for
right
now
I
want
to
just
show
that
when
I
said
this
cafe
is
inside
of
a
park,
I
want
to
actually
figure
out
what
cafe
that
is,
and
so
to
go
this.
So
I
got
the
data
from
openstreetmap.
C
It's
a
free
freely
available
data
source
for
a
bunch
of
geometric
and
geographic
sorry
data.
It
has
like.
C
A
really
great
way
to
put
it,
and
so
this
is
a
cafe-
this
is
called
caddy
katy
in,
and
so
I
I
looked
it
up
by
the
id
that
I
put
into
the
database.
I
happen
to
know
that
this
cafe
is
away,
there's
also
things
called
nodes
which
are
just
points.
C
B
A
C
Yeah,
there's
been
a
in
the
past
couple
years.
There
was
a
big
push
for
donations
and
I
think
that
was
they
met
a
big
target
with
openstreetmap
to
still
puffy.
A
B
D
C
And
she
is
she's
being
very
nice
right
now.
She's
letting
me
mostly
talk
good,
okay,
all
right,
so
we
have
this
this
intersection
of
the
park
and
cafe,
but,
like
I
was
saying,
there's
there's
really
not
that
much
data
here
I
mean
four
parks.
C
What
if
you're
gonna
plan
like
a
cafe
and
park
outing
with
like
a
group
of
friends,
you're
gonna,
want
to
know
more
than
just
what
cafes
are
in
parks.
I
think
we
can
walk
a
little
bit
more,
so
we
can
do
things
like
let
cafe
to
part
distance,
equal,
part.part,
geography,
dot,
distance
to
the
cafe,
dot,
cafe,
geography,
and
so
I
actually
have
a
habit
of
always
tagging
my
units.
C
C
Part
geography.sd
from
park.
This
is
going
to
tell
me
that
this
rid,
which
is
the
spatial
reference
identifier
and
don't
worry
if
these
are
just
jargon
for
now
I'll-
try
to
explain
it
a
bit
more.
C
This
essentially
tells
me
what,
when
I
have
an
a
latitude
of
whatever
and
a
longitude
of
whatever
else,
what
do
those
actually
mean
on
the
earth
and
without
going
into
too
much
details,
there's
several
different
ways
that
you
can
interpret
latitudes
and
longitudes,
and
this
one
happens
to
always
use
4326,
which
I'm
going
to
show
what
that
means
from
sis
that
spatial
reference
systems,
where
spatial
reference.
C
Equals
4326
this
is
called
wgs84,
which
is
the
most
common
model.
Gps,
the
gps
system
uses
wgs84.
C
This
is
sort
of
our
best
approximation
that
we
know
of
right
now,
for
what
the
shape
of
the
earth
is,
which
you
of
course
need
to
do
to
figure
out
how
you
get
from
point
a
to
point
b:
what's
the
shortest
path,
what's
the
distance,
and
this
particular
4326
happens
to
use
meters
for
its
measurement?
That's
what
that's
sort
of
what
I
wanted
to
point
out
here.
We.
A
C
A
Normally,
normally
you
don't
have
to
worry
about
these
things.
You
know
like
joe
said,
but
of
course
this
is
also
because,
while
the
earth
is
not
flat
and
I'm
fairly
confident
in
discerning
asserting
that,
I'm
also
confident
that
asserting
it's
not
spherical
either.
It's
like
a
bulgy
ellipsoid
thingy.
So
so
that's
what
those
are
basically
say:
map
it
to
some
kind
of
bulgy
thingy.
C
Yeah,
so
I
like
to
tag
all
my
variables
that
have
units
with
what
the
units
are,
so
here's
our
distance
in
meters
and
here's
how
many
meters
there
are
in
a
mile.
So
if
I
want
to
say
where
the
park
is
actually
okay,
where
the
distance
since
I
have
that
distance
is
less
than
or
equal
to,
let's
say:
half
a
mile,
so
0.5
times
meters
per
mile.
C
So
now,
when
I
select
this
out
and
I'll
say
like
what's
the
distance,
so
distance.
C
Is
cafe
and
park
dot
miles
miles,
and
I
don't
need
every
decimal
place
known
to
man,
so
we
have
the
distance
in
miles.
So
now,
when
I
select
this,
we're
gonna
see
two
things.
First,
we're
gonna
see
a
bunch
of
things
streaming
in,
but
actually
before
that
we're
gonna
see
a
big
delay
there.
C
We
go
there's
a
few
cafes
here
and
a
few
parks
and
the
reason
why
this
is-
and
this
is
not
gonna
finish
during
this
meeting-
so
I'm
just
gonna-
I'm
gonna
talk
about
it
and
then
I'm
gonna
kill
it
is
going
for
every
cafe
for
every
park
find
the
best
distance
between
them,
and
since
I
was
since,
like
I
was
telling
you
a
cafe,
could
be
a
polygon
that
shows
the
outline
it
has
to
figure
out.
Okay,
is
this
the
closest
point
to
the
polygon
to
in
the
cafe
to
the
park?
Nope?
Okay?
C
What
about
this
one?
What
about
that
one-
and
this
is
a
really
common
thing
you'd
want
to
do
you
want
to
know-
give
me
all
the
cafes
that
are
within
half
a
mile
from
another
park.
I
mean
that's,
that's
just
a
very
a
very
fundamental
thing.
We
need
to
be
able
to
do
so.
I've
killed
it.
We
need
an
index.
This
is
a
classic
thing,
for
we
don't
have
an
index,
we
need
an
index.
C
So
how
do
we
make
an
index?
There
is
no,
I
don't
know
of
any
ef
core
specific
ways
of
doing
a
spatial
index.
I
think
I
just
need
to
do
it.
Raw
sql.
B
C
So
I
guess
for
the
least
common
denominator:
people
using
sql
server,
I'm
going
to
just
make
an
empty
migration
here
and
I'm
going
to
just
say:
ems
sql.
C
That's
the
name
on
okay
on
park.
This
is
a
fancy
syntax.
You
can
look
it
up
if
you
don't,
if
you
haven't
just
made
this
demo
prep
and
done
this
a
zillion
times,
and
you
probably
would
want
to
look
it
up
on
the
documentation
absolutely,
but
for
the
purposes
of
this
demo,
I'm
just
going
to
make
these
and
sort
of
yellow
it
in
and
to
go
back
down.
C
We
go
ahead
and
just
drop
index
consistent,
as
always
you
don't
say
spatial
when
it's
going
back
down
drop
this
index
on
that.
Okay,
and
to
reread
it
like
five
times
to
make
sure
that
I
didn't
make
it
silly
typo.
C
Okay,
this
migration
looks
good,
so
now.net
ef
database
update,
and
so
now
I
have
a
spatial
index
and
what
a
spatial
index
does
is
that's
kind
of
exactly
what
you
think.
It's
a
way
to
index
your
data
so
that
for
spatial
queries
that
access
for
any
queries
that
access
the
spatial
parts
of
it
we'll
know-
and
I
think
it
uses
a
grid
for
this-
we'll
know
that
any
cafe-
I
guess,
we'll
probably
start
from
a
park
for
that
park.
C
C
C
Yeah
so
yeah
it
doesn't
stop
you
from
this
spatial,
like
zillions
of
dimensions
possible
with
these
spatial
queries
that
doesn't
stop
you
from
having
to
think
about.
Oh,
do
I
need
an
index
on
this.
What
kinds
of
queries
am
I
expecting
on
this
is
scale.
It
doesn't
stop
you
from
having
to
think
about
regular
index
stuff.
Should
I
put
index
on
this
column
or
not.
A
There
we
go
nice
so
lawrence,
the
my
sequel,
pamela.
My
sequel
says
that
they
have
house
index
is
spatial
so.
B
A
C
We
so
that's
my
main
demo
about
nts
with
ef
core
in
general.
Is
there
anything
that
someone
wants
to
go
over
before
I
switch
over
to
perhaps
another
side
demo
that
I
have
sort
of
not
too
prepared.
A
Well,
we're
at
10
50
now
so
we're
you
know
we
can
certainly
keep
going
longer
if
people
are
interested.
Let
me
just
show
one
comment
here
which
was
fairly
large,
but
it's
basically
saying
if
I've
got
a
lot
of
data,
is
it
still
useful
to
use
net
topology
suite
and
put
it
in
a
database.
C
It
entirely
depends
on
the
complexity
of
the
data
rather
than
the
size.
If
you
have
something
that
has
like
a
huge
long,
stringy
polygon,
then
that's
going
to
occupy
a
ton
of
spatial
tiles
like
all
across,
but
it
won't
occupy
a
ton
of
those
tiles.
So
the
spatial
indexes
won't
be
as
good.
There's
there's
a
lot
of
there's
a
lot
to
go
into
it,
it's
hard
to
say
just
50
gigabytes,
yeah,
100,
gigabytes,
no
yeah.
It's
really
a
complexity
thing
rather
than
a
size
thing
that.
A
Makes
sense
so
what
what
do
we
want
to
do
next?
Does
anybody
anybody
in
the
comments
have
any
further
questions
or
other
things
that
you'd
specifically
like
to
see
that'd
be
great
bryce,
I
don't
know,
do
you
want
to
do
you
want
to
go
over
a
couple
of
things
you
had,
or
should
we
do,
and
just
I
I
assumed
joe,
that
you're
okay,
with
not
doing
your
next
demo.
C
B
Sorry
one
monitor
as
well
yeah
yeah,
so
I
thought
this
just
might
be
interesting
for
people
to
see
these
are
kind
of
the
different
spatial
stacks
on
different
technologies.
Joe
briefly
mentioned
jts,
which
is
the
java
topology
suite
which
has
existed
since
before.net
existed.
B
I
think
it
came
around
in
like
2000,
and
all
these
things
are
sort
of
based
on
this
ogc
specification,
which
defines
all
these
operations
like
distance
and
intersects,
and
you
know
all
there's
a
bunch
of
them,
and
so
this
was
kind
of
the
first
programmatic
interface
on
top
of
it,
and
hibernate
was
built
on
top
of
that
shortly
after
jts
came
out,
they
ported
it
to
c
c
or
c
is
one
of
the
two
c.
B
Into
this
geos,
primarily
for
the
post
gis
project,
which
was
the
postgres
implementation
of
this
ogc,
simple
features
specification
and
then
later
spatial
light
came
and
reused.
This
geos
thing
to
add
spatial
to
sql
light
and
then
nts
is
like
geos
is
another
port
directly
of
jts,
onlyfor.net
and,
of
course,
m
hibernate,
which
is
a
port
of
hibernate
sort
of
parallel
stacks
here
built
on
top
of
that
to
implement
spatial,
and
so
when
we
were
looking
at
different
spatial
libraries,
when
we
were
doing
ef,
core
nts
was
really
the
best
fit.
B
Unfortunately,
I
don't
think
it
implements
the
ogc
simple
feature
spec,
so
it
didn't
really
map
to
what
sql
server
and
sqlite-
and
you
know,
postgres
and
all
these
databases
did
and
then
there
was
one
for
like
odata,
had
a
system.spatial
or
something,
but
it
was
super
narrow
in
its
view.
B
In
fact,
if
we
look,
I
have
another
slide
here.
This
is
kind
of
what
parts
of
spatial
odata
and
cosmos
db
happen
to
implement.
Odata
really
only
implements
three
of
the
dozens
of
operations
like
distance
between
things,
whether
two
things
intersect
and
then
like
a
length
of
a
path
in
cosmos,
again
very
limited
support
here.
B
No,
we
haven't
yet,
but
it
does
support
this
geojson
standard,
I
believe,
and
along
with
these
operations
here,
so
we
could
add,
limited
support
for
that.
These.
These
three
methods
at
least,
would
work
yeah
from
nts.
A
B
Absolutely
yeah
so,
like
the
two
big
spatial
scenarios
to
me
are
like
I
wanna
get
coffee
where's
the
nearest
cafe
right.
That's
the
distance,
find
the
thing
with
the
shortest
distance
from
where
I
am.
The
next
big
scenario,
I
think,
is
like
the
pizza
delivery
thing
you
know
like
I
live
here
which
of
these
pizza
delivery
places
deliver
to
my
house,
which,
which
delivery
area
am
I
within.
So
that's
like
90
of
spatial
scenarios
in
my
mind
for
apps,
so
I
think
it's.
A
A
long
time
ago
I
I
wrote
a
route
calculation
engine
when
I
was
working
on
satellite
navigation
systems,
so
that
gets
you
from
the.
Where
is
the
closest
one
to
my
house
by
as
a
crow
flies
to
actually,
if
I
had
to
walk
there,
how
long
it
is,
but
I
don't
think
most
people
are
going
to
implement
that
kind
of
thing
in
their
application.
It's
it's
fairly
complex.
C
There
is
a
support
for
that
in
a
library
called
itinerary
for
net.
It
can
use
open
street
map
data
and.
A
C
Will
it
will
extract
the
the
roads
from
that
and
say
like?
Oh,
this
is
a
walking
path,
and
so
you
can,
if
you
have
a
walking
profile,
you
can
go
down
it.
It
has
oh
cool
I've.
I've
actually
contributed
to
that
a
little
bit
in
the
past.
It's
pretty
cool,
very
nice
yeah.
B
Here's
a
reiteration
of
all
the
databases
that
implement
this
ogc
standard
that
we
talked
about.
Of
course,
we
have
ef
core
providers
for
for
all
these
now
and
teradata
has
one
too
still
waiting
for
oracle
and
db2
and
then
another
slide
I
really
wanted
to
show
is
one
of
the
things
that
really
drew
us
to
nts
was
both
how
compliant
it
was
with
the
standard.
B
Is
you
couldn't
do
simple,
like
indexers
or
dot
length
into
things,
and
it
felt
very
weird
to
call
these
methods
here,
so
I
really
appreciated
that
about
nts,
but
it
both
had
sort
of
the
compliant
definition
of
the
methods,
but
also
the
more
idiomatic
c-sharp
thing
to
do.
C
So
before
we
before,
we
call
this
wrap
this
up.
I
do
want
to
shout
out
a
couple
of
the
other
developers
who
were
working
on
this
project
before
I
got
on
felix
obermeyer
and
gwedi
judy.
C
I
they
were
working
on
this
since
before
it
was
even
on
github,
it
was
originally
on
google
code
and
if
you
look
through
the
svn
they're
all
over
the
place,
I
just
came
in
a
few
years
ago
as
a
contributor,
although
we've
been
using
it
at
work
for
quite
a
while,
and
so
I
wanted
to
say
that
those
guys
are
really
responsible
for
the
majority
of
what
we
see
here
in
nts,
I'm
just
representing
the
team
because
I
happen
to
be
available.
A
That's
awesome
thanks
joe
yeah,
and
I
think
I
think
it's
a
it's
another
another
example
of
how
the
open
source
community
around.net
is
really
growing
and
getting
very
vibrant,
and
it's
it's
great
to
have
these
kinds
of
discussions
where
you
know:
we've
got
microsoft,
ef,
stuff
and
nts
stuff
and
then
was
also
work
making
and
hibernate
better.
At
the
same
time.
You
know
this
is
a
super
super
exciting
to
have
all
of
this
open
soft
work
on
dotnet
and
very,
very
happy
for
all
the
contributions
you
and
everybody
else
have
made.
C
It's
been
good,
it
was
great
working
with
you
guys
during
the
development.
That
was
definitely
some
interesting
times
for
me
definitely
came
out
of
nowhere
where
it's
like
hey.
Let's
actually
add
this
to
ef
yeah.
A
A
Okay,
so
we're
out
of
time.
I
think
it's
been
a
really
good
discussion.
There's
you
know
feel
free
for
if
there's
additional
questions
to
follow
up
on
our
github
or
you
know
our
tweet
or
something
and
we'll
definitely
we'll-
definitely
try
and
answer
more
questions,
but
for
for
now
I
think
we'll
we'll
call
this
and
and
thanks
again
to
joe
and
everybody
for
watching.
Thanks
for
having
me.
A
A
I'm
supposed
to
do
some
kind
of
video,
so
you
know
which
ends
it,
but
I
can't
remember
what
the
button
is,
because
I
only
learned
this
morning
so
either
no,
it
looks
like
john's
off
the
stream,
so
I'm
just
gonna
say
bye
everyone
and
hit
end
broadcast,
and
hopefully
that
works
bye.