This repo contains all of the code for https://geodatadownloader.com
GDD is client-side browser application that will download all the data contained in an ArcGIS feature layer onto your computer. It is not limited by max query size, and can download any size dataset (yes that includes those huge parcel layers from your local county). You can choose a custom extent for your download, and pick the output columns you want to use.
GDD runs entirely in your browser and stores nothing besides what your browser caches locally. There is no backend to the application, besides the CDN used to serve up the html/javascript. In order to draw an extent the map uses ESRI's javascript library (and therefore ESRI's servers to serve up the data for the map). Conversion to from arcgis json to geojson is done browser side as well.
- GeoJSON
- CSV
- SHP (ESRI Shapefile)
- GPKG
- KML
- GPX
- PGDUMP
- DXF
- SQLite
It executes a query on the arcgis feature service that says where: 1=1.
Or, in other words, return everything. When it executes this query, it specifies the parameter returnOnlyObjectIds.
This returns all objectIds in a list.
Then, GDD paginates those objectIds into chunks of 500.
It then constructs a where: OBJECTID IN (...objectIds...) which returns those 500 features.
It then proceeds to do this until every chunk has been requested and written into the downloaded dataset.
You may be asking yourself "Why even ask for the objectIds and instead just grab all the features in that original where: 1=1?".
If GDD could, it would. ArcGIS REST services are typically are limited by a specific number of features they can return (usually around 1000, but it depends).
Some endpoints are "paginated", meaning that you can fetch features one page at a time. Not all services support this, though.
So instead, we use the objectIds method because it works a lot more consistently.
- Node.js: Version specified in
.nvmrc(v20.19.5)- We recommend using nvm to manage Node.js versions
- npm: Comes with Node.js
-
Clone the repository:
git clone https://github.com/mchaynes/geodatadownloader.git cd geodatadownloader -
Install Node.js (if using nvm):
nvm install nvm use
-
Install dependencies:
npm install
Start the development server on port 3000:
npm startThe application will be available at http://localhost:3000
Build the application for production:
npm run buildThe built files will be in the dist/ directory.
Run Jest unit tests:
npm testRun Playwright E2E tests:
npm run test:e2eFor interactive E2E testing:
npm run test:e2e:uiFor headed browser mode:
npm run test:e2e:headedRun ESLint to check code quality:
npm run lintapp/- Main application codesrc/- Legacy test setup filespublic/- Static assetstests/- Test files
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS, Material-UI, Flowbite
- Maps: ArcGIS API for JavaScript
- Data Processing: GDAL WebAssembly (gdal3.js)
- Testing: Jest (unit), Playwright (E2E)
Please ensure your code passes linting and all tests before submitting a pull request.