Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapefile Export broken for Zoning Atlas Dataset #366

Open
mzagaja opened this issue Dec 29, 2020 · 5 comments
Open

Shapefile Export broken for Zoning Atlas Dataset #366

mzagaja opened this issue Dec 29, 2020 · 5 comments
Labels

Comments

@mzagaja
Copy link
Contributor

mzagaja commented Dec 29, 2020

Describe the bug
When exporting the .shp for Zoning Atlas dataset, the Shapefile is 21KB and seems to contain no shapes.

Steps to reproduce
Walk us through how you revealed the bug.

  1. Go to https://datacommon.mapc.org/browser/datasets/421
  2. Click on .shp
  3. Unzip the file.
  4. Open .shp in QGIS and note it lacks shapes.

Expected behavior
We would expect to see spatial data. The .shp from SharePoint is about ~125MB.

@mzagaja mzagaja added the bug label Dec 29, 2020
@mzagaja mzagaja self-assigned this Dec 29, 2020
@mzagaja
Copy link
Contributor Author

mzagaja commented Dec 29, 2020

ogr2ogr -lco ENCODING=UTF-8 -f 'ESRI Shapefile' export-zoning-atlas.shp PG:'' -sql 'SELECT *,sde.ST_AsText(shape) FROM mapc.zoning_atlas'
ERROR 1: ERROR:  function getsrid(cstring) does not exist
LINE 1: SELECT getsrid("st_astext") FROM(SELECT *,sde.ST_AsText(shap...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

ERROR 1: ERROR:  function getsrid(cstring) does not exist
LINE 1: SELECT getsrid("st_astext") FROM(SELECT *,sde.ST_AsText(shap...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Based on the log output above when running the raw command, this may be a permissions issue related to ArcSDE.

@mzagaja
Copy link
Contributor Author

mzagaja commented Jan 4, 2021

@hydrickg Do you think there might be a permissions issue with ArcSDE here not being able to access the getsrid function from ArcSDE? I am wondering if there is a place we can GRANT this permission to the viewer user to surmount this, or if there is another ArcSDE issue blocking access.

@mzagaja
Copy link
Contributor Author

mzagaja commented Jan 4, 2021

Tried version bumping ogr2ogr without luck on this.

@mzagaja
Copy link
Contributor Author

mzagaja commented Jan 4, 2021

Another potential differential is the functional tables have an index labeled as such:

image

Whereas zoning atlas only has:
image

@mzagaja
Copy link
Contributor Author

mzagaja commented Jan 4, 2021

Also noting that the same logging output occurs when you try exporting a non-broken GIS db:

datacommon@live-mapc-org:/var/www/datacommon/shared$ ogr2ogr -lco ENCODING=UTF-8 -f 'ESRI Shapefile' export-walking-trails.shp PG:'' -sql 'SELECT *,sde.ST_AsText(shape) FROM mapc.rpa_poly'
ERROR 1: ERROR:  function getsrid(cstring) does not exist
LINE 1: SELECT getsrid("st_astext") FROM(SELECT *,sde.ST_AsText(shap...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

ERROR 1: ERROR:  function getsrid(cstring) does not exist
LINE 1: SELECT getsrid("st_astext") FROM(SELECT *,sde.ST_AsText(shap...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

I think we can be confident that whatever difference is occuring is not being logged.

mzagaja added a commit that referenced this issue Jan 6, 2021
* Because the Zoning Atlas data did not properly display for users who chose to use Excel as their CSV viewer, we are now providing a Sharepoint link that is in XLSX format for their conveinence.
* Even more annoying was that the shapefile did not include any shapes when we exported it. So we also had to create the shapefile manually and put into sharefile.

Related to #366 and #365, but does not fix them beyond Zoning Atlas.
mzagaja added a commit that referenced this issue Jan 6, 2021
* Because the Zoning Atlas data did not properly display for users who chose to use Excel as their CSV viewer, we are now providing a Sharepoint link that is in XLSX format for their conveinence.
* Even more annoying was that the shapefile did not include any shapes when we exported it. So we also had to create the shapefile manually and put into sharefile.

Related to #366 and #365, but does not fix them beyond Zoning Atlas.
@mzagaja mzagaja removed their assignment Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant