<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: download GeoJSON programmatically from Open Data site in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265438#M5596</link>
    <description>&lt;P&gt;Sorry for not getting back to you sooner. Looks like you got everything you needed.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 14:18:47 GMT</pubDate>
    <dc:creator>John_Spence</dc:creator>
    <dc:date>2023-03-08T14:18:47Z</dc:date>
    <item>
      <title>download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265156#M5589</link>
      <description>&lt;P&gt;I have this URL:&amp;nbsp;&lt;A href="https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/explore?location=37.930449%2C-79.486800%2C7.65" target="_blank" rel="nofollow noopener noreferrer"&gt;https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/explore?location=3...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/about" target="_blank" rel="nofollow noopener noreferrer"&gt;https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/about&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use python/arcpy and download all its data.&amp;nbsp; If I use the RestEndpoint there is a limit of 1000 records.&amp;nbsp; I cant seem to get all 50k.&lt;/P&gt;&lt;P&gt;Any ideas on how I can programmatically ?&amp;nbsp; Looking to get a GeoJSON or JSON and write it to a JSON file locally...&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 20:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265156#M5589</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T20:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265160#M5590</link>
      <description>&lt;P&gt;Here you go...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/wagisdev/extractservices/blob/main/extractservice.py" target="_blank"&gt;https://github.com/wagisdev/extractservices/blob/main/extractservice.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just add it to your pro project and it will pull it out.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 20:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265160#M5590</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2023-03-07T20:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265203#M5591</link>
      <description>&lt;P&gt;OK I am a bit confused here.....&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I thought I could just run the python through an IDE&lt;/LI&gt;&lt;LI&gt;path_Proj - what is this for? I want to use a .bat file to run this from a scheduled task not in arcpro&lt;/LI&gt;&lt;LI&gt;path_DataProcessing - what is this for?&lt;/LI&gt;&lt;LI&gt;path_DataFinal - agian what is this for?&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;I entered the portalURL below - this is NOT MINE.... its from DEQ so don't know if that is right or how to specify the actual Feature Layer.&amp;nbsp; Did I enter that correctly?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This is a public hub site and NOT mine.&amp;nbsp; Not sure where to specify where is downloading to and what format is it downloading?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;# Project Store Location
path_Proj = r'C:\ProjectPath\project.aprx'

# Data Store Location
path_DataProcessing = r'C:\ProjectPath\Pull-Processing.sde'
path_DataFinal = r'C:\ProjectPath\Pull-Final.sde'

# Target Projection
targetSRID = 6597

# Send confirmation of rebuild to
email_target = 'xxx@yahoo.com'
email_customer = 'xxx@yahoo.com'
email_subjectSchema = '' #Whatever you want the subject to be here.

# Configure the e-mail server and other info here.
mail_server = 'smtprelay.gis.dev'
mail_from = 'Message&amp;lt;noreply@gis.dev&amp;gt;'

# Portal Configs
portalURL = 'https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104'
portalUser = '' #Your User Name
portalPW = '' #Your Password encoded Base64.  Remove decode if you are not practicing security by obscurity.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 21:45:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265203#M5591</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T21:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265219#M5592</link>
      <description>&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;I think I create an arcpro project and put the Services in there that I want extracted in it????&lt;/P&gt;&lt;P&gt;How do I specify where they are going and what DB?&lt;/P&gt;&lt;P&gt;# Data Store Location&lt;BR /&gt;path_DataProcessing = r'C:\ProjectPath\Pull-Processing.sde'&lt;BR /&gt;path_DataFinal = r'C:\ProjectPath\Pull-Final.sde'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the Data Store Location define this?&amp;nbsp; if so I am not following here.... how does a .sde connection files tell me what specific Features to create or write to?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I have to have the ArcGIS Pro project open to run this?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 22:03:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265219#M5592</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T22:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265243#M5593</link>
      <description>&lt;P&gt;It wont even auth and get me into their portal....&lt;/P&gt;&lt;P&gt;This is the Hub trying to get to:&lt;/P&gt;&lt;P&gt;&lt;A href="https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104" target="_blank"&gt;https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is the URL set up in ArcGIS Pro&lt;/P&gt;&lt;P&gt;&lt;A href="https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/" target="_blank"&gt;https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;what am I supposed to use for portalURL?&lt;/LI&gt;&lt;LI&gt;Its open to the public therefor NO user name or password????&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_0-1678227763742.png" style="width: 700px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64622i7AE30A91FD497925/image-dimensions/700x329?v=v2" width="700" height="329" role="button" title="kapalczynski_0-1678227763742.png" alt="kapalczynski_0-1678227763742.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 22:23:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265243#M5593</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T22:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265265#M5594</link>
      <description>&lt;P&gt;Forgot I posted a mirror thread... go here for the solution....&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265132/thread-id/67003#M67006" target="_blank"&gt;https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265132/thread-id/67003#M67006&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 23:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265265#M5594</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T23:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265298#M5595</link>
      <description>&lt;P&gt;This did the same thing by getting the data from the service and put in my SDE&lt;/P&gt;&lt;P&gt;Couple Hundred lines of code less.... I know I can remove a few of the Imports ... they were from a lingering script&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy
import requests
import json
import os
import sys
import traceback
from datetime import date

arcpy.env.overwriteOutput = True

def copyData():
    # Set local variables
    inFeatures = 'https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/102'
    outLocation = r"C:\Users\xxx\Desktop\GIS_projects\TestingExportData\output.gdb"
    outFeatureClass = "TEST_PetTankFac"
    ## Add Expression
    #delimitedField = arcpy.AddFieldDelimiters(arcpy.env.workspace, "NAME")
    #expression = delimitedField + " = 'Post Office'"
         
    # Run FeatureClassToFeatureClass
    arcpy.conversion.FeatureClassToFeatureClass(inFeatures, outLocation, outFeatureClass)


if __name__ == '__main__':

    copyData()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:04:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265298#M5595</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T01:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: download GeoJSON programmatically from Open Data site</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265438#M5596</link>
      <description>&lt;P&gt;Sorry for not getting back to you sooner. Looks like you got everything you needed.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 14:18:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/download-geojson-programmatically-from-open-data/m-p/1265438#M5596</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2023-03-08T14:18:47Z</dc:date>
    </item>
  </channel>
</rss>

