SMASH/ios and geopackage

79 views
Skip to first unread message

Greg Troxel

unread,
Sep 9, 2021, 2:22:50 PM9/9/21
to geopapara...@googlegroups.com

I'm new to SMASH and having difficulties; I think this email is perhaps
best viewed as a superposition of a doc bug report, a real bug report,
and a report from a confused user.

For background, I'm osm user gdt, since 2009. I've been using qgis
desktop on NetBSD both editing features from field data collection and
creating pdf maps. I have made some leaflet web maps, and have been
using Vespucci with geojson layers as a basic GIS viewer. I maintain
the proj, qgis, gdal, geotiff, postgis, and gpsd entries in pkgsrc, a
multi-os multi-cpu packaging system. I mostly use Android vs iOS.

I recently became aware of SMASH and have tried it on an iPad via the
app store. I have gotten the basics to work by reading:

https://www.geopaparazzi.org/smash/

and have tried to look at the whole manual.

What I would like to do feels within the SMASH design:

load a points layer that I have created, basically a georeferenced
todo list (trail maintenance in conservation land). I have that in a
geopackage already, which I edit with qgis.

load a parcel polygon layer, which is natively in shp but I can
transform to geopackage

load an easements polygon layer

create some kind of todo/notes in a new layer of some sort that I can
later get at in qgis


I have nextcloud on the ipad so I can sync files, assuming an app will
read/write from nextcloud.


The manual says geopackages are supported:

https://www.geopaparazzi.org/smash/#_supported_map_types

but i am not able to add my geopackage.


After clicking the layers icon, I see OSM, and have been able to add
opentopomap. I see there is postgis, but I don't have a net-accessible
postgis handy, although certainly I could set one up.

The globe icon gets me online sources and I see how I could type in TMS
parameters. The "local" resources gives me a pretty empty hierarchy and
no way to get to nexcloud. Perhaps I'm just being oppressed by Apple,
and if I actually knew how to use iOS I should have known this.

In nextcloud, I can select open with, but SMASH is not an option.

Finally, I chose "save to Files" in nextcloud and put it in smash and
then was able to open.

My next problem was that I was using an unknown projection, EPSG:6319.
This is NAD83(2011) geographic, which is normal in the US (and in my
area crust-fixed). I got an unknown project error, and trying to load
it is not working. i pushed the "This proj is not supported. Tap to
solve." and then the + and then EPSG:6319 and ok and also 6319 and ok.
After that there are still only two projections, 3867 and 4326.

Obviously I can reproject my data to 4326 (which would incorrectly be a
null transform, or I can go to 7912 first, but it's only a meter
anyway), but it seems surprising that this doesn't load.

So perhaps I've found a bug, perhaps the docs are unclear, and perhaps
I'm confused. Any help would be appreciated.

Greg
signature.asc

Greg Troxel

unread,
Sep 10, 2021, 9:39:05 AM9/10/21
to geopapara...@googlegroups.com

Greg Troxel <g...@lexort.com> writes:

> My next problem was that I was using an unknown projection, EPSG:6319.
> This is NAD83(2011) geographic, which is normal in the US (and in my
> area crust-fixed). I got an unknown project error, and trying to load
> it is not working. i pushed the "This proj is not supported. Tap to
> solve." and then the + and then EPSG:6319 and ok and also 6319 and ok.
> After that there are still only two projections, 3867 and 4326.

Despite the warning remaining, I can see my data in basically the right
place. I cannot tell from looking if NAD83 is being transformed to
WGS84 or not, given the scale. (Plus, proj is likely to choose a null
transform anyway, long story not that relevant here.) So it at least
has the axis order and knowing it's geographic correct, which in this
case is entirely good enough.


That leads me to another question, which is that it's not clear how I
add a new geopackage with a point layer, but I am guessing I import it
and they try to edit it, and there isn't really an option to create it
within SMASH.

Thanks,
Greg
signature.asc

andrea antonello

unread,
Sep 15, 2021, 3:36:14 AM9/15/21
to geopaparazzi-u.
Hi Greg,
sorry for the late reply.
 
I'm new to SMASH and having difficulties; I think this email is perhaps
best viewed as a superposition of a doc bug report, a real bug report,
and a report from a confused user.

:-) 
 
For background, I'm osm user gdt, since 2009.  I've been using qgis
desktop on NetBSD both editing features from field data collection and
creating pdf maps.  I have made some leaflet web maps, and have been
using Vespucci with geojson layers as a basic GIS viewer.  I maintain
the proj, qgis, gdal, geotiff, postgis, and gpsd entries in pkgsrc, a
multi-os multi-cpu packaging system.  I mostly use Android vs iOS.


that is quite a curriculum. You got me at NetBSD :-)
 
I recently became aware of SMASH and have tried it on an iPad via the
app store.  I have gotten the basics to work by reading:

  https://www.geopaparazzi.org/smash/

and have tried to look at the whole manual.

What I would like to do feels within the SMASH design:

  load a points layer that I have created, basically a georeferenced
  todo list (trail maintenance in conservation land).   I have that in a
  geopackage already, which I edit with qgis.

yes, that works
 
  load a parcel polygon layer, which is natively in shp but I can
  transform to geopackage

it should load also in shp. Shp is supported in readonly mode though.
 
  load an easements polygon layer

  create some kind of todo/notes in a new layer of some sort that I can
  later get at in qgis

ok, that sounds all feasible.
 
I have nextcloud on the ipad so I can sync files, assuming an app will
read/write from nextcloud.


SMASH can only load data from its folder on the IOS filesystem. Not sure what you are implying.
 
The manual says geopackages are supported:

  https://www.geopaparazzi.org/smash/#_supported_map_types

but i am not able to add my geopackage.


After clicking the layers icon, I see OSM, and have been able to add
opentopomap.  I see there is postgis, but I don't have a net-accessible
postgis handy, although certainly I could set one up.

Mind that postgis is experimental in that it works only in online mode. We have activated it like that in order to see if people are interested and test it. In the future it would be good to make some sort of offline access mode. 
 
The globe icon gets me online sources and I see how I could type in TMS
parameters.  The "local" resources gives me a pretty empty hierarchy and
no way to get to nexcloud.  Perhaps I'm just being oppressed by Apple,
and if I actually knew how to use iOS I should have known this.

In nextcloud, I can select open with, but SMASH is not an option.

Exactly, that is what I meant before. To be honest I have no idea how to support such a feature on IOS. I thought only file manager apps could do that.
 
Finally, I chose "save to Files" in nextcloud and put it in smash and
then was able to open.

Ok, that is how we use it.
 
My next problem was that I was using an unknown projection, EPSG:6319.
This is NAD83(2011) geographic, which is normal in the US (and in my
area crust-fixed).  I got an unknown project error, and trying to load
it is not working.  i pushed the "This proj is not supported. Tap to
solve." and then the + and then EPSG:6319 and ok and also 6319 and ok.
After that there are still only two projections, 3867 and 4326.

Obviously I can reproject my data to 4326 (which would incorrectly be a
null transform, or I can go to 7912 first, but it's only a meter
anyway), but it seems surprising that this doesn't load.

So perhaps I've found a bug, perhaps the docs are unclear, and perhaps
I'm confused.   Any help would be appreciated.

It would be happy to look at a file like that if you can supply one.

We use this package to handle projections: https://pub.dev/packages/proj4dart
And when a new epsg code comes in, we try to get it online using the url:
https://epsg.io/EPSGCODE.proj4

It is not so nice but I could not come up with a better way back then. If you have ideas, I am all ears.

I will paste in here also your second email to keep it all together:

Despite the warning remaining, I can see my data in basically the right
place.  I cannot tell from looking if NAD83 is being transformed to
WGS84 or not, given the scale.  (Plus, proj is likely to choose a null
transform anyway, long story not that relevant here.)  So it at least
has the axis order and knowing it's geographic correct, which in this
case is entirely good enough.

I will have a look at what happens if you can send me a sample dataset.


That leads me to another question, which is that it's not clear how I
add a new geopackage with a point layer, but I am guessing I import it
and they try to edit it, and there isn't really an option to create it
within SMASH.

That is currently not possible from SMASH, I am afraid. In geopaparazzi we had the possibility to create a default one (which was actually a copy of an existing), but I didn't really like it. There would be the need to create a GUI for that. The code that generates a new database given the fields already exists. 

Cheers,
Andrea


 

Greg

--
You received this message because you are subscribed to the Google Groups "geopaparazzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-users/rmiy285mwwc.fsf%40s1.lexort.com.

Greg Troxel

unread,
Sep 15, 2021, 8:56:26 AM9/15/21
to andrea antonello, geopaparazzi-u.

andrea antonello <andrea.a...@gmail.com> writes:

> Hi Greg,
> sorry for the late reply.

No problem; very glad to hear back.

I should have said that right now I do field data collection with
Vespucci and external RTK, mostly just tracklog for trails, and "add
node from GPS" with notes for point features, and then I load that in
qgis and also josm, and edit my data or OSM, depending on whether the
data is appropriate for osm.

Also I pretty iOS clueless; I happen to have an old iPad with a cracked
but usable screen that was free to good home.

I am contemplaing SMASH for not only my use, but others in a local land
conservation organization to update e.g. locations of invasive plants
needing attention.

>> load a parcel polygon layer, which is natively in shp but I can
>> transform to geopackage
>
> it should load also in shp. Shp is supported in readonly mode though.

ok, but I'd rather move to geopackage so that I'm in the main path in
the app, and keep the complexity on desktop/gdal.

>> I have nextcloud on the ipad so I can sync files, assuming an app will
>> read/write from nextcloud.
>>
> SMASH can only load data from its folder on the IOS filesystem. Not sure
> what you are implying.

I expected nextcloud to sort of act like a file system provider and for
SMASH to be able to read from it. I realize now that doesn't work due
to way iOS works.

So I'd call this a doc bug that to load on iOS you have to first place a
file in the SMASH folder

> Mind that postgis is experimental in that it works only in online mode. We
> have activated it like that in order to see if people are interested and
> test it. In the future it would be good to make some sort of offline access
> mode.

It would be good if the doc said that, but I never expected it to work
offline.

>> The globe icon gets me online sources and I see how I could type in TMS
>> parameters. The "local" resources gives me a pretty empty hierarchy and
>> no way to get to nexcloud. Perhaps I'm just being oppressed by Apple,
>> and if I actually knew how to use iOS I should have known this.
>>
>> In nextcloud, I can select open with, but SMASH is not an option.
>
> Exactly, that is what I meant before. To be honest I have no idea how to
> support such a feature on IOS. I thought only file manager apps could do
> that.

Maybe so, but a brief hint for people would really help.
>
>> My next problem was that I was using an unknown projection, EPSG:6319.
>> This is NAD83(2011) geographic, which is normal in the US (and in my
>> area crust-fixed). I got an unknown project error, and trying to load
>> it is not working. i pushed the "This proj is not supported. Tap to
>> solve." and then the + and then EPSG:6319 and ok and also 6319 and ok.
>> After that there are still only two projections, 3867 and 4326.
>>
> It would be happy to look at a file like that if you can supply one.

Yes, I'll make one and send it offlist. But it's just a geopackage
with a single point layer, and EPSG:6319 CRS, created by qgis.

I tried to fetch https://epsg.io/6319.proj4 and get zero bytes.

> We use this package to handle projections:
> https://pub.dev/packages/proj4dart
> And when a new epsg code comes in, we try to get it online using the url:
> https://epsg.io/EPSGCODE.proj4

I didn't know whether to type in "EPSG:6319" or "6319". I tried both. I
think the app needs a better hint and better validation.

This is a datum transformation rather than projection, but I see that
library claims to handle it. Presumably with 7-parameter transforms,
and not with grid files, but that's fine for my case.

My ideas are:

1) The app knows the code, because it's in the geopackage. One could
a) just load the string if not loaded already when opening a geopackage
b) show different help text e.g. "EPSG:6319 not loaded; tap to
fetch from epsg.io" as a button (to warn the user of information
disclosure, but someone in the US using 6319 doesn't reveal much
:-)

2) donwload the strings for all the defined projections and just put
them in the app.

3) do 1, and also do 2 for common/normal national/regional datums. In
the US, that's EPSG:6319, and elsewhere ETRS89, GDA94, GDA2020 and I
bet a list of about 50 would cover a lot of cases.

9) prepare to get a headache about the upcoming move to time-varying
transformations

>> That leads me to another question, which is that it's not clear how I
>> add a new geopackage with a point layer, but I am guessing I import it
>> and they try to edit it, and there isn't really an option to create it
>> within SMASH.
>
> That is currently not possible from SMASH, I am afraid. In geopaparazzi we
> had the possibility to create a default one (which was actually a copy of
> an existing), but I didn't really like it. There would be the need to
> create a GUI for that. The code that generates a new database given the
> fields already exists.

That's not a big deal, but the manual should make it clear that you can
edit files you have added but that you can't create them. From what I
read I expected to be able to make a geopackage with a point layer
within the app, but I get the UI issues, and in terms of minimum code
for maximum usefulness, pre-creating it in qgis and loading it is really
pretty easy, especially since it needs thought about what fields and way.

A related coment about the simple notes, is that I don't get what they
are really; it seems like a layer (that can be exported/imported?) that
is special because it has a prominent UI to add. That's more of a
request to add a few sentences in the doc.

I don't mean to be critical of the doc; I know that when you understand
something well it's really hard to know what other people won't know.
So I hope it's useful to get a view of what was hard for me, from the
perspective of someone who understands the larger picture but not the
app (and not ios).

Greg
signature.asc
Reply all
Reply to author
Forward
0 new messages