MapInfo Pro Developers User Group

Welcome to the MapInfo Pro Developers community!  We are a group dedicated to the discussion and understanding of MapBasic and .Net MapInfoPro AddIn development. Bring your questions and ideas here. This group includes several members of the Pro development team from around the world.

Please feel free to start a discussion in the discussion tab or join in a conversation.

Product Information  Ideas Portal  MapInfo Community Downloads

Discussions

Members

Resources

Events

 View Only
  • 1.  Extracting points using a boundary

    Posted 03-01-2018 23:24

    I have 2 layers loaded. 1st layer are points and 2nd layers is a boundary. How do I use the boundary to extract the points from the 2nd layer? Thank you.



  • 2.  RE: Extracting points using a boundary

    Employee
    Posted 03-02-2018 00:52

    Hi Percy,

    Can you please clarify in further details what you mean by "extract the points from the 2nd layer" ? Do you mean that you wish to select all points which are within the boundary layer?

    Please provide some screenshots or attach some sample data if possible so that we may be able to better understand your exact requirements.

    Thanks,

    Dave



  • 3.  RE: Extracting points using a boundary

    Posted 03-02-2018 11:22
      |   view attached

    Dave, I have attached the file that has 2 tabs. 1a tab is the layer where I want to extract the points at. Query1a tab is the boundary. If I just load 1a tab and use MapInfo drawing select tools, I can select a part of the layer and extract the data. Is it possible to extract the points from 1a by using the boundary layer of query1a tab?

    I appreciate you help.

    Thank you.

    Percy

    Attachment(s)

    zip
    TestLayers.zip   1.14 MB 1 version


  • 4.  RE: Extracting points using a boundary

    Employee
    Posted 03-04-2018 18:07

    Thanks for attaching your data Percy. Taking a look at the two layers, it appears that '1a' resembles more of a boundary than 'Query1a'. However, at the moment the boundary is actually made up of lines, as can be seen in the Layer Control (screenshot below illustrates this). Assuming that you would like to use '1a' as a boundary layer to select all objects which are within it, you would therefore need to convert it to a region first. This can be done by making the layer editable in the Layer Control then selecting the line objects and going to SPATIAL > Convert to Regions under the Create area

    ScreenHunter 56

    Once the '1a' layer has been converted to regions, you could perform a SQL Select under SPATIAL > SQL Select to select all objects from 'Query1a' table within the boundary of '1a'.

    ScreenHunter 57

    Please refer to the following KB article which provides useful instructions and is a further example of the process applied above, where the same function is used to select points which fall within polygons.

    http://support.pitneybowes.com/VFP05_KnowledgeWithSidebarHowTo?id=kA180000000CerBCAS&popup=false&lang=en_US

    Hope this helps!

    Dave



  • 5.  RE: Extracting points using a boundary

    Posted 03-05-2018 14:08

    Dave,

    I will follow the procedure.

    I appreciate your reply.

    Thank you.

     

    Percy

     



  • 6.  RE: Extracting points using a boundary

    Posted 03-06-2018 07:06

    Hi Percy

    Remember that the simplest method to select points within a boundary is to use the? Boundary Select Tool/button - just click within the boundary of choice to make your selection



  • 7.  RE: Extracting points using a boundary

    Posted 03-06-2018 07:17
      |   view attached

    BoundSelect



  • 8.  RE: Extracting points using a boundary

    Posted 03-06-2018 11:12

    John,

    You are correct. That was the first option.

    I just needed to use the defined (detailed) boundary to extract the points.

    I appreciate your reply.

    Thank you.