On Thu, Apr 11, 2013 at 7:20 PM, Jason Poffenberger <jpo...@yahoo.com> wrote:
OK. Got the first revision done.Awesome. Did you push to github? I couldn't find it, let me know when you do and I can check it out directly. More responses inline.I would suggest that the triggers sections get removed and some general rules defined instead. For example a statement such asCREATE TRIGGER 'raster_columns_r_raster_column_insert'BEFORE INSERT ON 'raster_columns'FOR EACH ROW BEGINSELECT RAISE(ROLLBACK,'insert on raster_columns violates constraint: r_raster_column value must not contain a single quote')WHERE NEW.r_raster_column LIKE ('%''%');SELECT RAISE(ROLLBACK,'insert on raster_columns violates constraint: r_raster_column value must not contain a double quote')WHERE NEW.r_raster_column LIKE ('%"%');SELECT RAISE(ROLLBACK,'insert on raster_columns violates constraint: r_raster_column value must be lower case')WHERE NEW.r_raster_column <> lower(NEW.r_raster_column);ENDCould become a note such asr_raster column should be in all lower case without single or double quotesI'm not sure that we even need that note? But yeah, I guess if we want to put something in there that could make sense. But I feel like we could just assume people know how to create a proper column, and follow the cases we write in the spec.Also, I would make the create statements more generic such asCREATE TABLE raster_columns (r_table_name TEXT NOT NULL,r_raster_column TEXT NOT NULL,compr_qual_factor INTEGER NOT NULL DEFAULT -1,georectification INTEGER NOT NULL DEFAULT -1,srid INTEGER NOT NULL DEFAULT 0,CONSTRAINT pk_rc PRIMARY KEY (r_table_name, r_raster_column)ON CONFLICT ROLLBACK,CONSTRAINT fk_rc_r_srid FOREIGN KEY (srid)REFERENCES spatial_ref_sys(srid),CONSTRAINT fk_rc_r_gc FOREIGN KEY (r_table_name) REFERENCES geopackage_contents(table_name))Could becomeCREATE TABLE raster_columns (table_name TEXT NOT NULL,raster_column TEXT NOT NULL,compression_quality INTEGER NOT NULL DEFAULT -1,georectification INTEGER NOT NULL DEFAULT -1,spatial_reference_identifier INTEGER NOT NULL DEFAULT 0,)and make a note that spatial_reference_identifier is a foreign key.Makes sense. But yeah, I feel like if we're not defining the constraints in the main spec then there's no reason to define the create statement at all. People should be able to make it. But we can put the whole thing in the gpkg-safe side spec, for people who want to define tables with proper constraints.As a matter of fact, the whole raster_column table should go out the door. It should look more like the MBTiles table with maybe georectification, spatial_reference_identifier, and possibly compression_quality but I don't know why compression_quality would matter. Anyway, I would rework almost the whole sql spec to be more MBTiles like.Definitely. But let's hold off on that until we get the first few milestones I laid out. First just factor out all the extraneous pieces (sql statements, requirements, weird notes on implementation) to side specs. So we have at least an mbtiles style spec. And then we can start doing pull requests on real changes, that we can track.Though I guess if you want to try it early, before the formatting changes, you could make a branch just for the full changes and PR that. May get out of date though.But yeah, I agree on getting it down to super similar to MBTiles. But first want to show how even their sort of weird existing spec could become a whole lot more readable.JasonTo: Jason Poffenberger <jpo...@yahoo.com>
Cc: Scott Clark <sct...@gmail.com>; "gpkg-til...@googlegroups.com" <gpkg-til...@googlegroups.com>; Benjamin T Tuttle NGA-IIG USA CIV <Benjamin...@nga.mil>
Sent: Thursday, April 11, 2013 6:37 PM
Subject: Re: Next steps
Cool, yeah, I just assigned a ticket to you. And on that branch there should be a safe-gpkg.md file, where you can dump all the sql.Thanks!On Thu, Apr 11, 2013 at 6:34 PM, Jason Poffenberger <jpo...@yahoo.com> wrote:I can go ahead and put in the sql statements on the branch right now. I'll try directly on your branch. If anyone else is doing it, please stop me.To: Scott Clark <sct...@gmail.com>
Cc: "gpkg-til...@googlegroups.com" <gpkg-til...@googlegroups.com>; Jason Poffenberger <jpo...@yahoo.com>; Benjamin T Tuttle NGA-IIG USA CIV <Benjamin...@nga.mil>
Sent: Thursday, April 11, 2013 5:56 PM
Subject: Re: Next steps
Ok, just put out 0.1.0.Now we can start rearranging much more.I'm going to make branches for 'sql reorg' and 'requirements reorg'. I think that if I create the branches on the command line then everyone should be able to edit directly online on the branch. Just have to switch to the branch in the dropdown. Let me know if that doesn't work.Plan should be to put both all the sql statements and then all the requirement statements in side documents.On Thu, Apr 11, 2013 at 4:33 PM, Chris Holmes <cho...@opengeo.org> wrote:
Ok, so I think the best we can do is to use headings. If you use like heading 5 or 6 it can be pretty small. So we could like turn all the table header text in to headings, and then we'd be able to link to them internally. Linking internally is easy, you just do (#internal-id) for the link.On Thu, Apr 11, 2013 at 3:56 PM, Chris Holmes <cho...@opengeo.org> wrote:
Hrm, yeah, that doesn't actually get us what I was hoping for. It's just to put the link references at the bottom of the page...On Thu, Apr 11, 2013 at 12:04 PM, Chris Holmes <cho...@opengeo.org> wrote:
I haven't played with it yet or got it working, but see https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-linksOn Thu, Apr 11, 2013 at 10:56 AM, Scott Clark <sct...@gmail.com> wrote:Writing this up, I was wondering how to link to elements within the doc (using the markup). There are a lot of cross-references (to some table or some clause) and it would be ideal that those are all hyperlinked. Being new to markup, I couldn't find a way to tag those elements for cross-reference.
Notes maybe we can put at the end of the document, and do internal links to them?
And the requirements / conformance class stuff makes sense to me in another annex.
Thinking we can just do each annex as a separate document in the same repo.
Scott
Sure. I'm knee deep in updating Android maps to version 2 right now and I won't get to it until tonight. If you can wait I can do it tonight.
What I was thinking about the design of this thing, mull this over. Right now the spec assumes there will be a named overlay, much like how you name an overlay in ArcCatalog. That's what the table_name represents, the name of the layer such as "Rivers_In_Africa" and in all the sql statements it's a foreign key back to that named layer. However, MBTiles doesn't go by named overlays, just a grid number and zoom level. If we move towards MBTiles where there are no named overlays, just a grid, then most of the current sql will have to be modified, most likely extensively. Are we planning on moving away from named layers and just assume a grid system?
Chris,
So are we thinking of having two separate types of imagery, rasters and tiles? If so, would the tiles be specifically for background maps laid out in grid format and the rasters use arbitrary geometry and not for use as the background in maps and more as an overlay?
I saw you merged the sql back into the main trunk. Do I still make a pull request?
If we make a separate tiles spec, there are probably some things to do different than MBTiles. I was talking to Ben and his opinion is instead of just one and only one image tile per grid per zoom level, there could be the possibility of more than one tile per grid per zoom level. Also, there could be more than one projection. Does that sound about right? Should I work up a model for that? If we are splitting out tiles from general rasters, I think it may be beneficial to have the data models a little different.
Is there anything specific you want me to do right now? If not, I wouldn't mind working a smallish data model sort of as an enhancement to the MBTiles model. I find I can write better if I already have an idea of a working model.
Jason
Cc: "gpkg-til...@googlegroups.com" <gpkg-til...@googlegroups.com>; Tuttle Benjamin - Ben- T NGA- IIG USA CIV <benjamin...@nga.mil>
Sent: Monday, April 15, 2013 4:29 PM