473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How do I do the spatial join?

Hello!
I'm trying to select just some buldings within a polygon.
I want to get the polygon in fastkart.ak layer that have the kommunkod = 2085.

I want all data from fastkart.by that are within the polygon.
I'm quite new to sql and can't figuare out how to do this.

I've added a picture with database and my sql so far.

SELECT * as by
(SELECT kommunkod
FROM fastkart."ak" as ak
WHERE kommunkod = '2085')
FROM fastkart."by" by
WHERE ST_Intersects(by.geom,ak.geom)

Can anyone help me?
Attached Images
File Type: jpg Skärmklipp.jpg (35.0 KB, 118 views)
Mar 6 '18 #1
0 1908

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michele Locati | last post by:
Hello NG! I'm going to use MySQL to manage spatial data in a website made with PHP. In its manual I've seen that MySQL can manage georeferenced elements (points, lines and so on). But this...
0
by: Kiyoung Yang | last post by:
Hi, I'm using Oracle 9i with the spatial option. It seems that the spatial function, e.g., SDO_NN, does not consider the 3rd element in a point. I tried the following script to create a table,...
0
by: Gijsbert Noordam | last post by:
------_=_NextPart_001_01C349DA.E4B7E120 Content-Type: text/plain; charset="iso-8859-1" Hi, As a newcomer to this mailing list -- and to the MySQL database environment -- my main field of...
2
by: Belinda | last post by:
Hi. I am just getting started with DB2's spatial extender and could really use some help. Pointers to good docs or examples are welcome. I am using DB2 version 8 on Sun. I have a database of...
11
by: Brad | last post by:
To DB2 Personal Developer Edition GIS users: How do I acquire a spatial extender license key for the DB2 PDE? I expected to be able to use it right out of the box. Brad
1
by: vasilip | last post by:
I'm testing out db2 for a project I'm starting that requires proper xml support and I can't seem to get both xml and spatial data to work well in the same table. Once having created a table...
2
by: dvelst | last post by:
Hi All, I have the following query which was based on a working query in MySQL: (don't be afraid of the size of the query you see below, later on I will concentrate on part of this query) ...
2
by: Ken Fine | last post by:
I have a database of lat/long positions. What I want to be able to do is to be able to filter that database based on a selection by the user. In other words the user picks point X and I want to...
0
by: Pras403 | last post by:
Hi, I am starting with IBM DB2 for spatial data and have installed DB2 express for mac but am unable to install DB2 spatial extension as I couldn't find any relevant links for spatial extension for...
0
by: tpcolson | last post by:
Using the following SELECT * FROM dbo.GRSM_WETLAND_POLY CROSS APPLY (SELECT TOP 1 Name, shape FROM GRSM.dbo.GRSM_Trails --WITH(index(S319_idx)) WHERE...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.