Giter Site home page Giter Site logo

geopaparazzi's Introduction

Geopaparazzi

DOI

Get it on Google Play

Join the chat at https://gitter.im/geopaparazzi/geopaparazzi

This repository contains the complete code of the Android app geopaparazzi.

Notes on the file structure

  • geopaparazzi_acrylicpaint contains the markers used for the sketches.
  • geopaparazzi_app contains the app, but is only a very small wrapper that extends the real application activity inside geopaparazzi_core. This is what you want to change to brand your own geopaparazzi app. Just change the colors, icon, and style.
  • geopaparazzi_core contains the geopaparazzi application logic.
  • geopaparazzi_library contains the reusable generic geopaparazzi Android code.
  • geopaparazzi_map contains the main mapsforge parts used.
  • plugins contains the various plugins used for importing and exporting.

geopaparazzi's People

Contributors

alexkarezin avatar brentfraser avatar dispiste avatar gitter-badger avatar hofoen avatar lucadelu avatar mj10777 avatar moovida avatar nimu avatar tacothedank avatar tghoward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geopaparazzi's Issues

integrate with markers

The old (and very simple) sketching system should be substituted with the markers application.

Notes:

  • should we check on markers availability or directly integrate it, since it is small? Versions upgrade whouldn't be too much of a hassle
  • sketch notes would simply call it
  • map notes would call it with the map image once the map is selected. The user can choose if he wants to sketch the map note or leave it as it is. The map image is overwritten
  • picture notes would call it with the picture once the picture is selected. A second image should be created with something like _sketch.jpg at the end. Originals are not overwritten.

identify tool error

I've loaded an sqlite db containing the position of hydrants (points) and municipal boundaries (polygon), if I made a rectangular selection the results are good but if I pick in a point of the map without draw a rectangular selection, the data resulting are not congruent, es. a lot of different municipal name.

label for SpatialLite vector layer

Reported by pzs.vac, Jul 26, 2013

The labeling helps the navigation and give info

the user can select 1-2 labeled layer only
the labeling visible over limited resolution

3.5 (android 4.1)

add share button

Try to add a share button to parts that allow it the standard Android way. Ex. images, pics, maps.

change tags.json

Change tags to remove mandatory parts in simple notes (images, sketch, map)

review the add note workflow

The add notes workflow should be reviewed a bit to give the possibility to chose in a simple way between positioning the note in the gps position or the center of the map (in the cross, as it currently works from amp view).

Add comments here to suggest ideas.

zoom and bounds calculation problems

There are some problems with zoom to and bound calculations:

  • when I use zoomto on spatialite layers, I get in the middle of nowhere
  • when using mapsforge background data, I can't zoom out more than level 14, which seems to be the minZoom set by default

Negative / West values for longitude not recorded in .properties file for image

What steps will reproduce the problem?
1.Go to area where longitude can be expected to be recorded as negative
e.g. Wilmington, North Carolina @ lat=34.22xxxx, long=-77.94xxxx
2.dashboard > take note > photo

Alternately, in map view, center map somewhere West and take map center photo note .

What is the expected output? What do you see instead?
IMG_XXXXXXXX_XXXXXX.properties file for photo taken should have longitude match longitude photo was taken at, i.e. long=-77.94xxxx, but shows up as a positive number = 77.94xxxx (in India).

What version of the product are you using? On what operating system?
Geopap 3.6.2
Android 4.1.2 with HTC Sense 5.0 on HTC One.

Please provide any additional information below.
The negative values for longitude are recorded correctly in geopaparazzi.db (but only to two decimal places).
uDig references .properties file for media import.

black screen

Probably due to the maps loading too much work is done in the main thread and a black screen appears at startup.

create SpatialiteUtilities class

  • SpatialiteUtilities class. in [package eu.geopaparazzi.spatialite.util;]
  • Goal is to:
  • - determine which Spatialite Database version is being read
  • - create a new Spatialite Database
  • - convert a sqlite3 Database to a Spatialite Database
  • - convert older spatialite Databases to present version
  • -- these spatialite functions may not be accessible from sql

sqlite.SQLiteDatabase vs. jsqlite.Database

I am beginning to get worried about the use of 2 different Database classes inside eu.geopaparazzi.spatialite.
The original mbtiles classes used sqlite.SQLiteDatabase, whereas everything else used jsqlite.Database - where I assume the spatialite,proj4,geos and gdal functionality is coming from.

I believe we would be shooting ourselves in the foot in retaining sqlite.SQLiteDatabase in eu.geopaparazzi.spatialite which is only used in the mbtiles logic.

Unfortunately mbtiles is heavenly dependent on, specially when used with AsyncTask:

  • ReentrantReadWriteLock
    -- this may only work correctly with sqlite.SQLiteDatabase and not jsqlite.Database
  • .beginTransaction(),.setTransactionSuccessful(),.endTransaction()
    -- worst case scenario these could be replaced with 'BEGIN,COMMIT,ROLLBACK'
  • ContentValues
    -- used for the storing of blobs

MBTilesDroidSpitter.insertTile() is a good sample where all of this is used.
If I could get a working sample of insertTile() working with the jsqlite.Database logic, I could take of the rest.

My fear is that one day some sort of spatialite functionality might be consider desirable, but would not be possible.

A policy decision to use only one Database class, at least in eu.geopaparazzi.spatialite, maybe in the whole project may be wise.

Tilemill .mbtiles problem

Reported by alessandro.battisti, Aug 28, 2013

I can't load a Tilemill .mbtiles (sard2.mbtiles) as basemap in Geopaparazzi 3.6.2, my log: http://www.pasteall.org/45206

I can load it only if I modify it with these sql commands (sard3.mbtiles):

create table android_metadata (locale text);
insert into android_metadata values ('en_US');

I'm using TileMill 0.10.1, Ubuntu 12.04 64 bit, Alcatel OT-997D, Android 4.0.4.

Data: http://ge.tt/1T6YJer?c

Error log:

08-28 09:56:25.471 I/SqliteDatabaseCpp(26615): sqlite returned: error code = 1, msg = no such table: android_metadata, db=/mnt/sdcard/geopaparazzi/geopaparazzi.db
08-28 09:56:25.471 E/SqliteDatabaseCpp(26615): SELECT locale FROM android_metadata failed
08-28 09:56:25.479 E/SQLiteDatabase(26615): Failed to open the database. closing it.
08-28 09:56:25.479 E/SQLiteDatabase(26615): android.database.sqlite.SQLiteException: no such table: android_metadata
08-28 09:56:25.479 E/SQLiteDatabase(26615): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2075)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1014)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:962)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at eu.geopaparazzi.spatialite.database.spatial.core.mbtiles.MBTilesDroidSpitter.open(MBTilesDroidSpitter.java:31)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at eu.geopaparazzi.spatialite.database.spatial.core.MbtilesDatabaseHandler.getSpatialRasterTables(MbtilesDatabaseHandler.java:69)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at eu.geopaparazzi.spatialite.database.spatial.SpatialDatabasesManager.getSpatialRasterTables(SpatialDatabasesManager.java:109)
08-28 09:56:25.479 E/SQLiteDatabase(26615): at eu.hydrologis.geopaparazzi.GeoPaparazziActivity.onCreate(GeoPaparazziActivity.java:158)

gpx export time fix

Geopaprazzi current version have one problem about GPX file format in "" TAG.
It can not accept to OpenStreetMap or other GPX reading software.

See,
http://wiki.openstreetmap.org/wiki/GPX_Import_Failures#Why_didn.27t_my_GPX_file_upload_properly.3F

I this document, time format is

"<time>2007-10-14T10:09:57Z</time>"
GPX Official schema is same as below.
<xsd:element name="time" type="xsd:dateTime" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Creation/modification timestamp for element. Date and time in are in Univeral Coordinated Time (UTC), not local time! Conforms to ISO 8601 specification for date/time representation. Fractional seconds are allowed for millisecond timing in tracklogs.
</xsd:documentation>
</xsd:annotation>
</xsd:element>

http://en.wikipedia.org/wiki/ISO_8601

datetime format need UTC and ISO8601.

And so,

  <time>2013-11-25 18:03:02</time>

should convert to UTC and add "T", "Z" string,

  <time>2013-11-25T09:03:02Z</time>

when geopaparazzi create gpx string data from sqlite database records.

better geosms parsing

If a geosms has a part after the url, the content should be used as bookmark text.

mbtiles backed tiles save even if the data is not valid

This can be reproduced with the mapnik.mapurl datasource:

  • turn off the wifi
  • open geopap
  • select the mapnik.mapurl source
  • go on the map view in a zone that didn't have tiles already
  • tiles are properly rendered as white placeholders
  • turn on the wifi
  • tiles are fetched and rendered only for zones not already taken by placeholders

I think the placeholder tiles are put in the database, even if they should not, since once
real tiles come in, they should be placed and displayed.

Map Annotations or Labels

If I want to show a parcel layers address in each Poly what would be the best way to do this ? Annotation or Label? Any recommendations on how I can accomplish this ?

missing translation

    menu.add(Menu.NONE, MENU_DATA, 2, "data").setIcon(android.R.drawable.ic_menu_compass);

Mesurement Tool modification

     /**Add ability of the measurement tool to utilize inches rather than meters. **/

public final class ConvertMetric {

  /** Multiplier for meters to feet. **/

private static final double FEET_CONVERT = 3.2808399;

private ConvertMetric() {}

       /** Convert a number of meters to feet. **/
  • @param meters Value to convert in meters.
  • @return meters converted to feet.
    */

public static double asFeet(final double meters) {
DecimalFormat twoDForm = new DecimalFormat("#.##");
return Double.valueOf(twoDForm.format(meters * FEET_CONVERT));
}

tiles sources list cleanup

The tilesource list needs to:

  • be sorted alphab.
  • remove DATABASERENDERER
  • make mapnik and opencycle default and mbtiles backed

Sketch Note with Map Canvas

I would like to prompt the user to choose to sketch on an empty canvas or the map when the user selects to do a sketch note. If they choose to use the map, then the tmp.png that is dumped to the geopaparazzi folder could be used as the map canvas right? So the choices would include: (BLANK CANVAS) or (MAP CANVAS).

What do you think would be the best way to prompt the user to make the choice?

I was playing with something like the following:

            // create a Dialog Prompt

            final Dialog dialog = new Dialog(context);


            //tell the Dialog to use the dialog.xml as it's layout

            dialog.setContentView(R.layout.dialog);

            dialog.setTitle("Type of Canvas");

            TextView txt = (TextView) dialog.findViewById(R.id.txt);

            txt.setText("What type of canvas would you like to sketch on?");

I was able to load the tmp.png into the canvas but when the tmp.png is located in \drawable-hdpi by using the following:

public class MaptoCanvas extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(new myView(this));
}

private class myView extends View {

    public myView(Context context) {
        super(context);
        // TODO Auto-generated constructor stub
    }

    @Override

    protected void onDraw(Canvas canvas) {

        // TODO Auto-generated method stub
          Bitmap myBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.tmp);
                  canvas.drawBitmap(myBitmap, 0, 0, null);

    }

}

}

But how can I implement this in geopapa so the user can choose to use a blank canvas as it is now or use a map canvas? Please Help?

thoughts about sharing

It would be nice to have sharing of certain elements through the Android system.

Certainly text notes and images would be simple.
Need to investigate sharing of complex notes, that contain both text and images.

landscape Mode problems

I am having issues with the integrated markers branch. Any time I rotate my device when in mapView, I get that "app is not responding" error, then geopaparazzi restarts. I Know this is not much info but I will do some logging and post here.I just Wanted to get the issue in to start.

virtual tables bound to shapefiles

Need to check the spatialite connection to shapefiles via virtual tables.

From the spatialite list:

I suspect you can use virtual tables for this. I tried following sequence (on Android device) and the result was myroads, fully working copy of the shapefile /sdcard/maps/roads.shp:

CREATE VIRTUAL TABLE roads using virtualshape('/sdcard/maps/roads',CP1252,3857);
select RegisterVirtualGeometry('roads');
create table myroads as select * from roads;
select recovergeometrycolumn('myroads','Geometry',3857,'LINESTRING')
select CreateSpatialIndex('myroads','Geometry'); 

It is important that shapefile in the first command must have full path, and no .shp extension.

Jaak

visualize project name

The gui should allow to see easily the name of the project currently loaded.

Maybe the info button could be a good place.

OSM tilelayer level 19

With the OSM tiles it should go also on zoom level 19, which was added a while ago on osm rendering (currently goes only till zoom 18)

Ps Nice move to github :-)

Issues with mapview since the update

Andrea,

I notice that where you choose the basemap . It used to say Database_renderer right ?

And I used to choose Database_renderer and choose my .map file. Now it is listed in the first list but when I choose it now it does not work. The app just freezes and I get stop responding error. I suspect its something with the customtiledownloader or something. Probably in the tiles dir.

Tool to create forms

Geopaparazzi it's easy to use, suitable for all. Forms are very useful to collect survey data so I think we need a simple tool to create custom forms.

About page license

"The maps are from © OpenStreetMap Contributors, CC-BY-SA"

Creative commons applies to the tiles, the copyright attribution should be only © OpenStreetMap Contributors

(current license is odbl)

add SpatialiteUtilities class

  • SpatialiteUtilities class. to [eu.geopaparazzi.spatialite.util]
  • Goal is to:
  • - determine which Spatialite Database version is being read
  • - create a new Spatialite Database
  • - convert a sqlite3 Database to a Spatialite Database
  • - convert older spatialite Database to present version
  • -- these spatialite function may not be accessible from sql

Add Map to canvas to sketch on

Hey Andrea,

I am trying to add an option in the option menu of the drawing activity to let the user add the map view they are currently seeing to the canvas for sketching on.

So far I have:

DrawingActivity.java

        private static final int MENU_ADD = 3;
          menu.add(Menu.NONE, MENU_ADD, 3,      
            R.string.add_map).setIcon(android.R.drawable.ic_menu_add);

             case MENU_ADD:
           addMap();
            return true;

             private void addMap() {
              Intent choosePictureIntent = new Intent(Intent.ACTION_PICK, 
             android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
            startActivityForResult(choosePictureIntent, 0);
            }

           protected void onActivityResult(int requestCode, int resultCode, Intent  
              intent) {
           super.onActivityResult(requestCode, resultCode, intent);

             if (resultCode == RESULT_OK) {
               Uri imageFileUri = intent.getData();

I really would like to get this working. Could you help me out with this? I think I might be making this more difficult than it is. Any help would be great.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.