Results 1 to 10 of 39

Thread: Query Location

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Question Query Location

    I have 3000+- quarter sections that I need to query. Is there a simple way to save the location coordinates for all of these sections to external query files?
    I know I could select each one and save to external file, just hoping someone has a better idea!
    Thanks,
    Rob

  2. #2
    Civil Engineering Moderator MHultgren's Avatar
    Join Date
    2000-12
    Location
    Indy West (Not West Indies)
    Posts
    1,446
    Login to Give a bone
    0

    Default Re: Query Location

    Are you wanting to save the window limits of each one or just the centroid? If you have LDT, place a point at the intersections and you can export the coords (X.Y.and Z - if needed) to a file. and then build a template query to pull in the type of data you want, then use the ol' cut - n - paste (in your favorite ascii editor) to change the coordinates for each section, do a save-as with section number or something that makes sense. Here is the format of the qry file. Make sure that you have created your project info prior to generating the template, build your query and run it on the first section to make sure you have everything you need showing, then save that to an external file. Open that file and look for the areas in red below to see what you would need to change. I would probably round off the coordinates and give yourself a bit of a buffer ( add or subtract 10 to each X and Y coordinate to make sure your get the whole section.
    (setq ade_cmddia_before_qry (getvar "cmddia"))
    (setvar "cmddia" 0)
    (mapcar 'ade_dwgdeactivate (ade_dslist))
    (setq ade_tmpprefval (ade_prefgetval "ActivateDwgsOnAttach"))
    (ade_prefsetval "ActivateDwgsOnAttach" T)
    (setq dwg_id(ade_dsattach "path(s) of drawings to query"))
    (ade_prefsetval "ActivateDwgsOnAttach" ade_tmpprefval)
    (ade_qryclear)
    (ade_qrysettype "draw")
    (ade_qrydefine '("" "" "" "Location" ("window" "inside" (681885.371764 920871.924347 0.000000)(683411.390529 919379.271217 0.000000))""))
    (ade_qrydefine '("AND" "" "" "Property" ("objtype" "=" "object types")""))
    (ade_qrydefine '("AND" "" "" "Property" ("layer" "=" "layers")""))
    (ade_qrysetaltprop nil)
    (ade_qryexecute)
    (setvar "cmddia" ade_cmddia_before_qry)
    Once you build your "Template query, you should only have to change the coords and do a save-as.

  3. #3
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: Query Location

    Mark,
    Thanks for the tip, that is basically what I'm trying to avoid.

    I'm guessing I'm not the first person to deal with Local Agency GIS data.
    I'm trying to break down 953MB of data into quarter section size drawings so our designers can open them.
    With help from others here, I have the routine to query and block out each drawing, but I'm trying to find a better way to put together the query files that contain the location of each quarter section boundary.
    I have created them in the past just by defining the query location and selecting a boundary.
    I don't want to cut & paste 3000 query files, if there is a better way, just thought I would check and see if anyone has come across this already.
    Thanks again,
    Rob

  4. #4
    Civil Engineering Moderator MHultgren's Avatar
    Join Date
    2000-12
    Location
    Indy West (Not West Indies)
    Posts
    1,446
    Login to Give a bone
    0

    Default Re: Query Location

    Rob,

    You could always dump the section coords into an MDB and set up your queries from there using the quarter section number as the index field?
    Are you trying to break out topo for each section? Take a look at WWW.DOTSOFT.COM. Terry has a new tool that might be just what you are looking for. It is called GridWorks. Not sure if it is what you are looking for, but it might be of some assistance

  5. #5
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: Query Location

    Quote Originally Posted by MHultgren
    Rob,

    You could always dump the section coords into an MDB and set up your queries from there using the quarter section number as the index field?

    M,
    Newbie here!
    How would I go about doing this?
    Thanks,
    Rob

  6. #6
    Civil Engineering Moderator MHultgren's Avatar
    Join Date
    2000-12
    Location
    Indy West (Not West Indies)
    Posts
    1,446
    Login to Give a bone
    0

    Default Re: Query Location

    Well, you would need to start by registering and catching up with the ATP085 course (under Education - ATP Courses) while you still can. This will give you the training to access and talk with MS Access for your MDB. Once you get through that, then you would be able to connect to that DB from the Map Pulldown. It is a bit much to try explain breifly on here though. Pull out the Help file and tutorials to walk you through the procedures.

    <from the ACMAP Help File>
    Using AutoCAD Map, you can link information from an external database to objects in your drawing, and then retrieve objects from source drawings using the linked information. For example, with a database of traffic flow information, you can link traffic records in the database to roads in the drawing, and then run a query to display only those roads with high volume traffic.

    After you create the links, use the Data View to select, highlight, view, and edit records in the database table.

    The first step in using external databases is to attach the data source to your project.

    You can view the external table using AutoCAD Map's Data View. You can customize the look of the Data View and hide and freeze columns in the display.

    If you want to link records from the table to objects in your drawing, create a link template that specifies how to uniquely identify each record in the table.

    Once you create a link template, you can link records from the table to objects in your drawing.

    You can then use those links to view and select objects based on their linked data.

    You can also set options that specify how you use external database tables with AutoCAD Map.
    Last edited by MHultgren; 2005-08-31 at 02:05 PM.

  7. #7
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: Query Location

    Quote Originally Posted by MHultgren
    Are you wanting to save the window limits of each one or just the centroid? If you have LDT, place a point at the intersections and you can export the coords (X.Y.and Z - if needed) to a file. and then build a template query to pull in the type of data you want, then use the ol' cut - n - paste (in your favorite ascii editor) to change the coordinates for each section, do a save-as with section number or something that makes sense. Here is the format of the qry file. Make sure that you have created your project info prior to generating the template, build your query and run it on the first section to make sure you have everything you need showing, then save that to an external file. Open that file and look for the areas in red below to see what you would need to change. I would probably round off the coordinates and give yourself a bit of a buffer ( add or subtract 10 to each X and Y coordinate to make sure your get the whole section.
    Once you build your "Template query, you should only have to change the coords and do a save-as.
    Mark,
    Can you export points from LDT to Access Database?
    Rob

  8. #8
    Civil Engineering Moderator MHultgren's Avatar
    Join Date
    2000-12
    Location
    Indy West (Not West Indies)
    Posts
    1,446
    Login to Give a bone
    0

    Default Re: Query Location

    Actually, you don't have to export them, they are already in an MDB under the Project Folder - cogo-points.mdb. Depending on the release, I believe the DB is in MSAccess97 format. You don't want to change the format or you will not be able to use them in LDT until your export\repair it back down to the older version.

  9. #9
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: Query Location

    Mark,
    So if I were to place points at all intersections of my topo and wanted to setup a database to link to my topo, I could save this database and setup the links to it.
    Correct?
    This would give me the coordinates for each quarter section.
    Rob

  10. #10
    Civil Engineering Moderator MHultgren's Avatar
    Join Date
    2000-12
    Location
    Indy West (Not West Indies)
    Posts
    1,446
    Login to Give a bone
    0

    Default Re: Query Location

    Rob,
    When you create the points using LDT, the database is built for you. This is why I suggested that approach in the beginning. Why do all the extra work? Let the software create the points AND the DB.Then when you define your query, just add a "fudge factor to the coordinates to make sure that you get everything inside your bounding box. Something along the lines of If PTX1 Less than PTx2 then set PTX1 to PTX1-5 and set PTX2 to PTX2+5. Where PT is your point, X would be the easting coordinate and 1 -2 would be the point listing. So it would look at the X or easting of one point in the list and compare that to the next point in the list and if the first one was lower, then it would take that coordinate and subtract, say 5' from itand you would need to do the same for the Northings as well to create your bounding box with an offset from each corner of 5' east and 5' north in this case. Then use those coords for your limits of the query. So if you had 4 points with coords of (1,1), (1,0), (0,1), (0,0) your query would end up using coordinates of (6,6 ), (6,-5), (-5,6) and (-5,-5).
    Hope I explained this correctly.
    Last edited by MHultgren; 2005-09-29 at 08:52 PM.

Similar Threads

  1. Location of Call Out | Location of Detail
    By baker in forum AutoCAD Sheet Set Manager
    Replies: 1
    Last Post: 2013-07-10, 06:06 PM
  2. Publish DWF query
    By Dave F. in forum Revit - Platform
    Replies: 0
    Last Post: 2008-11-12, 11:33 AM
  3. Doing query through FDO
    By VBOYAJI in forum AutoCAD Map 3D - General
    Replies: 4
    Last Post: 2007-04-20, 09:38 AM
  4. map query's from GIS shapes
    By gisdude in forum AutoCAD Map 3D - General
    Replies: 3
    Last Post: 2006-03-31, 11:02 PM
  5. Massing query?
    By aliya14 in forum Revit Architecture - General
    Replies: 8
    Last Post: 2006-03-24, 04:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •