I need a SQL select query to select all of the points that are within
1 metre of any of the lines. It seems simple but I can't get it to
work - can anyone help
Thank you
Dave
You need to create a temporary buffer around you're lines and then
select the points within these:
Select * from points where obj within any (select buffer(obj, 12, 1,
"m") from lines) into selection
HTH
Greg Driver
System Administrator
Applications Support
ICT
NOT PROTECTIVELY MARKED
Try:
Select *
From POINTS
Where OBJ Within Any (Select CartesianBuffer(OBJ, 24, 1, "m") From LINES)
Be aware that your points are selected as many times as there are within the line buffers.
So if a point is within 2 buffers, it will appear twice in the result.
You can avoid this if you ahve an ID you can group by
Peter Horsbøll Møller
GIS Developer, MTM GeoInformatics
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail p...@cowi.dk
http://www.cowi.dk/gis
-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of davidhhardman
Sent: Tuesday, October 16, 2007 10:22 AM
To: MapInfo-L
Subject: [MI-L] Another SQL Query question
Is there a site where things like this are explained? I have a User
Guide here for MapInfo but it doesnt seem to tell me things like this.
Cheers
On Oct 16, 9:32 am, "Driver, Greg 9434"
> Dave- Hide quoted text -
>
> - Show quoted text -
There's quite a good section in the back of the MI User Guide (Appendix
D in the v7.0 User Guide) on creating expressions that can be used
within SQL statements, though it doesn't cover everything. I've also
attached a short document that covers some 'advanced' SQL statements as
well. Failing that, you best bet is to keep posting on MI-L!
Regards
On Oct 16, 10:01 am, "Driver, Greg 9434"
> AdvSQLHandout - Tom Probert, MapInfo.zip
> 551KDownload- Hide quoted text -
.
Speaking for pre-v9 versions, the target *tablename.** isn't available
in MapInfo SQL, only * by itself.
Although it would be a welcome addition, and supposedly rather simple to
add, it hasn't been yet.
Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro
Rob Schneider - Aurchem Exploration skrev: