4 - Select by Location - ArcMap Scripting with Python and Arcpy

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 82

  • @TheVentureaaron
    @TheVentureaaron 6 лет назад +2

    Thanks, great tutorials for a guy new to arcgis. Also want to say, scripting is a must for people looking to automate layer creations off a daily/weekly upload of points.

  • @daytodatainc
    @daytodatainc 3 года назад

    I've been trying to learn ArcGIS & Python: my man you are KILLING IT! Great job so far on these tutorials, the are extremely helpful on helping me get started.

    • @Franchyze923
      @Franchyze923  3 года назад

      Awesome! Glad they are helping you out.

  • @rhizomefriend
    @rhizomefriend 2 года назад +1

    If you press ctrl+Q whilst hovering over your module function in pycharm (e.g. something like "arcpy.SelectLayerByLocation_management()") then it should display the documentation in pycharm itself. Saves a bit of extra clicking.
    Thanks for the tutorial.

    • @Franchyze923
      @Franchyze923  2 года назад +1

      I did not know that! Thank you

  • @jasondoss5619
    @jasondoss5619 7 лет назад +1

    Great job man! Been out of python for a while, this is exactly what I needed as a refresher. Very easy to follow.

  • @auxirus8124
    @auxirus8124 3 года назад +1

    it is working on shapefile and gdb but not on mdb...i can't do this with personal geodatabase....what should i do now????

    • @Franchyze923
      @Franchyze923  3 года назад

      Hmm, I've never tried with a personal geodatabase. Can you just use a file geodatabase instead? I know personal geodatabases have limitations.

  • @Roberta4133
    @Roberta4133 3 года назад +2

    It is really hard to see which such a small font size and with the black background. The course is good, but it's hard to keep going with so much effort to actually see it.

    • @Franchyze923
      @Franchyze923  3 года назад +1

      yea I know, I try to use bigger font in my newer videos. The code for this series is on GitHub. Might help to have that
      github.com/franchyze923/Code_From_Tutorials/tree/master/Arcgis%20Scripting%20with%20Python%20Arcpy

    • @Roberta4133
      @Roberta4133 3 года назад

      @@Franchyze923 that's really nice of you, thanks a lot! It really helps and save lots of time having the code :) cheers!

  • @arkadiuszsrodula3071
    @arkadiuszsrodula3071 Год назад

    When I try this code it works using PyCharm or another interpreter like Pythonwin, but it doesn't work using IDLE Python 2.7. Do you know why?

  • @mctennis3579
    @mctennis3579 6 лет назад +1

    This does not work for me. It generates an output file but it is empty. I am using ArcGIS Pro and Python 3. Any input on how to update the script for the new version?

    • @Giobaski
      @Giobaski 6 лет назад +2

      I've got an empty output too, as i guess i had a name error. check this """ "NAME" = 'United States of America'""" not "United States"

    • @sajadhamid2000
      @sajadhamid2000 2 года назад

      @@Giobaski thanks dear.... you saved my time

  • @SuperDanisse
    @SuperDanisse Год назад

    ¡Great tutorial even in 2023! One question: does arcpy run the same functions regardless of the ArcGIS version? If I'm still using Arcmap, is arcpy independent from the ArcGIS version you have?

    • @Franchyze923
      @Franchyze923  Год назад

      I'm actually not sure.. I think there are probably minor updates to arcpy between arcgis versions but in my experience arcpy behaves the same between different versions. If there is a difference it's probably minor and documented

  • @mohamadachour837
    @mohamadachour837 3 года назад +1

    Thanks a lot. Very good tutorial to learn python for ArcMap.

    • @Franchyze923
      @Franchyze923  3 года назад +1

      You’re welcome! Thanks for watching

  • @rohitbhardwaj4104
    @rohitbhardwaj4104 3 года назад

    i am getting the following error at the time of SelectLayerByLocation
    ERROR 000561: Relationship invalid for selected layers
    have used the exact same thing

    • @Franchyze923
      @Franchyze923  3 года назад

      hmm that's odd, have you tried copying the code from GitHub? - github.com/franchyze923/Code_From_Tutorials/tree/master/Arcgis%20Scripting%20with%20Python%20Arcpy
      Are you using the same data?

  • @Rarehunter02
    @Rarehunter02 4 года назад +1

    THANK YOU SO MUCH!! Worked like a charm :)

    • @Franchyze923
      @Franchyze923  4 года назад

      Great! Glad to hear the video was helpful!

  • @23894732498723498732
    @23894732498723498732 6 лет назад +3

    Thank you for the video! It is very helpful. I ran into one issue when querying the name of US from the countries shpfile. I had to use "United States of America" for the script to work instead of just US. I figured I would let others know in case they ran into the same issue.

    • @Franchyze923
      @Franchyze923  3 года назад

      Thanks for pointing this out! I'm going back and rewriting the code so I can put it on GitHub and yes it seems like the shapefile changed slightly.

  • @sethster1991
    @sethster1991 8 лет назад +1

    Extremely helpful! Thanks for posting!

    • @Franchyze923
      @Franchyze923  7 лет назад

      You're welcome! Thanks for watching

  • @bright1402
    @bright1402 5 лет назад +1

    Great tutorial! But I think it would be better if you provide a github link so that we could get access to the codes easily.
    Anyway, nice job!

  • @afzalriz-v8361
    @afzalriz-v8361 4 года назад

    Sir! Would you give me a favor
    When I give where clause('NAME' = 'Pakistan') in make feature layer
    It give me an error "Keyword can't be an expression" and shows = as error
    kindly help me and provide the solution of this problem
    I'll be very thankful

    • @Franchyze923
      @Franchyze923  4 года назад +1

      Are you putting it in quotes correctly? It should look like """ "NAME" = 'Pakistan' """
      I know it is very sensitive to the quotes so just make sure it follows the format in the video.

    • @afzalriz-v8361
      @afzalriz-v8361 4 года назад

      @@Franchyze923 thank you sir
      My problem has been solved

    • @Franchyze923
      @Franchyze923  4 года назад +1

      @@afzalriz-v8361 Awesome!

    • @afzalriz-v8361
      @afzalriz-v8361 4 года назад

      @@Franchyze923 thank you for solving my problem sir 😍

  • @surajkamboj631
    @surajkamboj631 Год назад

    Hi dear sir Do not clear this video ... all videos is low quality please provide High quality

  • @uavabl1747
    @uavabl1747 4 года назад +1

    This is very helpful video. Thanks a lot

  • @labhanshjain6804
    @labhanshjain6804 4 года назад

    It is not taking the where clause....In output it is taking all of the cities instead of cities in America. So can you share the syntax?

    • @Franchyze923
      @Franchyze923  4 года назад

      Can you share what you tried?

    • @labhanshjain6804
      @labhanshjain6804 4 года назад +1

      @@Franchyze923 sorry I got i correct, there was syntax error by me in the where clause.

    • @Franchyze923
      @Franchyze923  4 года назад

      Great! Glad to hear. Thanks for watching

    • @labhanshjain6804
      @labhanshjain6804 4 года назад

      @@Franchyze923 Can u share your mail? I have some doubts so then I can share screenshots with you

  • @arsalkha2768
    @arsalkha2768 2 года назад

    you are amazing, keep it up i really like your videos

  • @labhanshjain6804
    @labhanshjain6804 4 года назад

    Can you please share the link for the syntax from where you were copying it

    • @Franchyze923
      @Franchyze923  4 года назад +1

      Hey, here you go. desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make-feature-layer.htm
      This is the latest documentation. In the video I was using a slight older version. For the most part syntax should be the same.

    • @julieromig448
      @julieromig448 3 года назад +1

      @@Franchyze923 "for the most part" - I spent two days changing quotes etc and finally got it to work with """ NAME LIKE 'United States%' """ :(

    • @Franchyze923
      @Franchyze923  3 года назад

      @@julieromig448 yikes - glad you got it figured out. SQL Syntax can be annoying

    • @Franchyze923
      @Franchyze923  3 года назад

      @@julieromig448 I went back and recoded this and uploaded it to GitHub. The reason you had to use that query is because 'United States' is no longer a name value in that shapefile, they changed it to 'United States of America'
      github.com/franchyze923/Code_From_Tutorials/tree/master/Arcgis%20Scripting%20with%20Python%20Arcpy

  • @Mrtaylorrulien
    @Mrtaylorrulien 7 лет назад

    Can you call features in geodatabases using arcpy as well?

    • @Franchyze923
      @Franchyze923  7 лет назад

      You sure can! That's a good topic for a video. I'll try to make one soon. I just realized all my videos only deal with shapefiles, not geodatabases.
      Here's a bit of code to help you get started.
      import arcpy
      ws = arcpy.env.workspace = r'F:\Files\GIS\OSM_data\Philadelphia_Metro_Area_OSM.gdb'
      fc_list = arcpy.ListFeatureClasses()
      for x in fc_list:
      print x
      This will just print all of the features in a geodatabase. You can also print all fields in a feature class with
      arcpy.ListFields().

  • @gipsydanger3504
    @gipsydanger3504 5 лет назад +1

    where can i find this shapefile ?

    • @dingolucky
      @dingolucky 4 года назад +1

      www.naturalearthdata.com

  • @uavabl1747
    @uavabl1747 4 года назад +1

    It will be appreciative, if you prepare more related video.

    • @Franchyze923
      @Franchyze923  4 года назад

      Do you have any specific topics you'd like to see videos on ?

    • @uavabl1747
      @uavabl1747 4 года назад

      Create arc tool using python and not only select by Location. May other geo processing tools. Also discus OOPs concept, Multithreading. Discuss detail ArcPy Cursors- how it works.
      Thanks for your reply

    • @Franchyze923
      @Franchyze923  4 года назад

      I just made some new videos on Arcpy with ArcGIS Pro! Check them out
      ruclips.net/p/PLO6KswO64zVt8YCuKIOdCsJvlUivXETGu

    • @uavabl1747
      @uavabl1747 4 года назад

      @@Franchyze923 Thanks. You are so helpfull

  • @nourabawazir6183
    @nourabawazir6183 3 года назад

    i got a message "no module named arcpy" what i can do ?

    • @Franchyze923
      @Franchyze923  3 года назад

      Are you using the version of python that comes with arcmap?

    • @nourabawazir6183
      @nourabawazir6183 3 года назад

      @@Franchyze923 no, i use it in python idle.... but when i wrote the code on arcmap its works!
      tell me please if there’s a way i can fix this problem.
      Thank you for answering:)

    • @Franchyze923
      @Franchyze923  3 года назад

      @@nourabawazir6183 in Idle can you run this and let me know what is says.
      import sys
      print(sys.executable)
      I think you might be using a different version of Python.

    • @nourabawazir6183
      @nourabawazir6183 3 года назад

      @@Franchyze923 c:\users\msi user\appdata\local\programs\python\python39\pythonw.exe
      That’s what happened
      I use python 3.9

    • @Franchyze923
      @Franchyze923  3 года назад

      Yea sounds like you’re not using the right version of Python. You might have multiple versions installed on your computer.
      In arcmap type the same thing in the Python window and that is the version of Python you need to use

  • @KenechukwuEzekwem
    @KenechukwuEzekwem 6 лет назад

    Thanks! This was quite helpful!

  • @guangxiaosheng4249
    @guangxiaosheng4249 6 месяцев назад

    找arcgis搭子,一起学习提高呀

  • @oakwise2352
    @oakwise2352 3 года назад

    THANK YOU SO MUCH!!!!!

  • @AEClimbingTV
    @AEClimbingTV 3 года назад

    Thank you for this!

    • @Franchyze923
      @Franchyze923  3 года назад

      You're welcome! Thanks for watching

  • @amitchoubey1837
    @amitchoubey1837 2 года назад

    font too small cannot read

  • @taibouchmohamed2154
    @taibouchmohamed2154 7 лет назад

    good video thank u so much bro

    • @Franchyze923
      @Franchyze923  7 лет назад

      You're welcome, glad it helped you out

  • @changxu5842
    @changxu5842 7 лет назад

    thank you so much!!!!

  • @brankokuridza8386
    @brankokuridza8386 6 лет назад

    Thank you

    • @Franchyze923
      @Franchyze923  3 года назад

      You're welcome! Any other videos you'd like to see?

  • @shubangzhao3832
    @shubangzhao3832 4 года назад

    Nice !