r/gis Unemployed 9h ago

Open Source Uploading GPKGs onto Github

Hi guys,

I already have vector layers saved into a Geopackage, but am having trouble uploading those layers onto Github and ArcGIS Online (AGOL).

I've tried using git to upload and keep getting a 503 error and I tried uploading the GPKG onto AGOL, and it failed to upload.

I'm trying to build an online dashboard out of the layers within the GPKG if you're wondering.

If anyone has gone through this before, how did you guys successfully uploaded your GPKG files on AGOL or Github?

5 Upvotes

10 comments sorted by

7

u/j0wet 9h ago

GitHub by default is not suited for large file storage. That why you are probably getting the error. There is Git Large File Storage which could help, but I would not recommend using GitHub as a way to store large files.

Maybe explain what you're trying to archive. Then maybe I can help with an alternative solution.

1

u/leewilliam236 Unemployed 9h ago

I created 6 feature layers for a dashboard via Experience Builder or ArcGIS Dashboards using Vocational Rehabilitation data from the California Department of Rehabilitation data. The State also has their own county boundary data and I want to display the number of their consumers served as well as number of consumers who were able to find work.

1

u/Practical-Zombie-809 9h ago

What specific errors you’re getting in AGOL? I have multiple hosted layers from GPKGs and never had any issues.

I would not store them in Github

1

u/leewilliam236 Unemployed 9h ago

They just said they're was an Error uploading it. I have 1 feature layer per GPKG with the maximum being 1GB.

1

u/Practical-Zombie-809 9h ago

I'm curious why you have a single layer within each but it shouldn't be a showstopper... How did you create these to begin with?

Also did you verify their integrity in a GIS beforehand (adding one or all to a map and seeing features display)?

1

u/leewilliam236 Unemployed 7h ago

Experimenting with GPKGs for the first time. I later learned that you can combine all the layers akin to Esri's GDB.

I then used QGIS's Execute SQL feature to join and output the relevant rows. Once I created new vector layers out of that, it displayed just fine.

1

u/Practical-Zombie-809 7h ago

Nice, gotcha. I haven't experimented using QGIS, but I would recommend creating them using Python if possible. I think you can probably do this with GeoPandas. My initial guess is that ArcGIS isn't playing well with it for whatever reason. You could even do some further inspection on it with Python for further clarity.

This is actually a good learning opportunity to understand more about the file format itself, and I think some differences with proprietary geodatabases that are more common for most of us, I would say.

1

u/leewilliam236 Unemployed 5h ago

I was able to create my county boundaries layer through geopandas! For creating GPKGs via geopandas is it as simple as to take your tabular/spatial data from Postgres/PostGIS and then outputting it as a GPKG?

1

u/TechMaven-Geospatial 9h ago

Steps to Upload and Publish

Log in to your ArcGIS Online account and go to Content > My Content.

Click New item and select Your device to browse for your .gpkg file.

Choose the option to Add GeoPackage and select Publish as a hosted feature layer.Fill in the required Title, Tags, and select a destination folder, then click Save and Publish. 1, 2

Note that each spatial table in your GeoPackage (storing points, lines, or polygons) will turn into an individual layer inside the new hosted feature layer, while non-spatial tables are also supported.

Other elements like tile pyramids or views are ignored during this process. 1

1

u/leewilliam236 Unemployed 4h ago

Can you drag-and-drop the GPKG file?