Re: [Geotools-devel] jdbc negative dates

2016-04-19 Thread Justin Deoliveira
Great! Thanks for letting me know Ben. Glad it’s fixed! On Tue, Apr 19, 2016 at 3:41 PM Ben Caradoc-Davies wrote: > The online build passed on ares and locally for me against postgis. > Thanks, Justin! > > Kind regards, > Ben. > > On 20/04/16 06:58, Ben Caradoc-Davies wrote: > > Thanks, Justin,

Re: [Geotools-devel] jdbc negative dates

2016-04-19 Thread Ben Caradoc-Davies
The online build passed on ares and locally for me against postgis. Thanks, Justin! Kind regards, Ben. On 20/04/16 06:58, Ben Caradoc-Davies wrote: > Thanks, Justin, I have kicked to online build to confirm. > > Kind regards, > Ben. > > On 20/04/16 06:35, Justin Deoliveira wrote: >> Should be fi

Re: [Geotools-devel] jdbc negative dates

2016-04-19 Thread Ben Caradoc-Davies
Thanks, Justin, I have kicked to online build to confirm. Kind regards, Ben. On 20/04/16 06:35, Justin Deoliveira wrote: > Should be fixed now > > . > On Tue, Apr 19, 2016 at 12:10 PM Justin Deoliveira > wrote

Re: [Geotools-devel] jdbc negative dates

2016-04-19 Thread Justin Deoliveira
Should be fixed now . On Tue, Apr 19, 2016 at 12:10 PM Justin Deoliveira wrote: > I’ll take a look. > > On Tue, Apr 19, 2016 at 10:57 AM Andrea Aime > wrote: > >> Hi guys, >> it seems this change broke the pos

Re: [Geotools-devel] jdbc negative dates

2016-04-19 Thread Justin Deoliveira
I’ll take a look. On Tue, Apr 19, 2016 at 10:57 AM Andrea Aime wrote: > Hi guys, > it seems this change broke the postgis online tests build? > > > http://ares.boundlessgeo.com/jenkins/view/geotools/job/geotools-master-online/470/ > > http://ares.boundlessgeo.com/jenkins/view/geotools/job/geotoo

Re: [Geotools-devel] jdbc negative dates

2016-04-19 Thread Andrea Aime
Hi guys, it seems this change broke the postgis online tests build? http://ares.boundlessgeo.com/jenkins/view/geotools/job/geotools-master-online/470/ http://ares.boundlessgeo.com/jenkins/view/geotools/job/geotools-master-online/471/ Cheers Andrea On Sat, Apr 16, 2016 at 5:58 AM, Jody Garnett

Re: [Geotools-devel] jdbc negative dates

2016-04-15 Thread Jody Garnett
Thanks Justin, I am happy to fix up a few headers and merge - I like how the date conversion was handled int the filter visitor. If I include this in the beta2 can I ask a few of the people tagged in on this thread to help out with the testing :) -- Jody Garnett On 15 April 2016 at 15:34, Justin

Re: [Geotools-devel] jdbc negative dates

2016-04-15 Thread Justin Deoliveira
Ok, here is my cut at this one: https://github.com/geotools/geotools/pull/1173 It leans on the recent conversion from Date to Long added to TemporalConverterFactory, and also adds the reverse conversion from Long to Date. The test case exercises reading the date values, as well as writing them

Re: [Geotools-devel] jdbc negative dates

2016-04-15 Thread Justin Deoliveira
On Fri, Apr 15, 2016 at 2:05 AM Andrea Aime wrote: > On Fri, Apr 15, 2016 at 5:31 AM, Justin Deoliveira > wrote: > >> Hey guys. So as I started on this I quickly came to the realization >> (which I apologize for not seeing the obvious before) but interpreting >> values as seconds won’t really bu

Re: [Geotools-devel] jdbc negative dates

2016-04-15 Thread Andrea Aime
On Fri, Apr 15, 2016 at 5:31 AM, Justin Deoliveira wrote: > Hey guys. So as I started on this I quickly came to the realization (which > I apologize for not seeing the obvious before) but interpreting values as > seconds won’t really buy us anything if we’re bound by the value space of > long tha

Re: [Geotools-devel] jdbc negative dates

2016-04-14 Thread Jody Garnett
I saw the following: GregorianCalendar cal = new GregorianCalendar(); cal.clear(); cal.set(-500, 0, 1); And was not sure what the set method was doing .. I thought it would be adjusting when the calendar started counting from. Reading the docs shows calendar is set for

Re: [Geotools-devel] jdbc negative dates

2016-04-14 Thread Jody Garnett
Perhaps I misunderstood the code - I will need to look tomorrow. On Thu, Apr 14, 2016 at 8:54 PM Justin Deoliveira wrote: > Where do you see that? Are we looking at the same patch? The only thing I > really see in the patch is converting to/from milliseconds to date and then > some logic to appen

Re: [Geotools-devel] jdbc negative dates

2016-04-14 Thread Justin Deoliveira
Where do you see that? Are we looking at the same patch? The only thing I really see in the patch is converting to/from milliseconds to date and then some logic to append a “BC” to encoded date literals when the date falls in the BC era. On Thu, Apr 14, 2016 at 9:33 PM Jody Garnett wrote: > I th

Re: [Geotools-devel] jdbc negative dates

2016-04-14 Thread Jody Garnett
I think the patch takes the approach of adjusting the calendar time is being measured against. Can we be tricky and produce a calendar for each section of geological time :) On Thu, Apr 14, 2016 at 8:31 PM Justin Deoliveira wrote: > Hey guys. So as I started on this I quickly came to the realiza

Re: [Geotools-devel] jdbc negative dates

2016-04-14 Thread Justin Deoliveira
Hey guys. So as I started on this I quickly came to the realization (which I apologize for not seeing the obvious before) but interpreting values as seconds won’t really buy us anything if we’re bound by the value space of long that’s used for java.util.Date. Re-implementing a new date type based

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Justin Deoliveira
Great, thanks for the input Jonathon and David. I think I have enough to put together a proposal on how to improve the current patch. Going to start that in a new thread. On Tue, Apr 12, 2016 at 1:38 PM Jonathan Marino wrote: > Just to be clear from the MapStory end, to be honest, we don't reall

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Justin Deoliveira
Perfect, that is what I needed :) Ok, so having two types makes sense. One to be able to go back to time zero but also limited in terms of resolution to seconds, and one that doesn’t go all the way back but gives you down the millisecond. Or do you think that two types is overkill and we can get

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Justin Deoliveira
Thanks David. I was clear that native postgresql timestamp couldn’t do the job, but my question was whether bigint had a big enough value space for geologic time? If we interpret the value as milliseconds is it big enough? Or do we need to interpret as seconds in order to go back far enough? On Tu

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Justin Deoliveira
Thanks for the info guys, You’ll have to bear with me as you walk me through the nuances of representing time in this way. So in order to represent full geologic time do you need more than just a numeric value? Or is that you just need a numeric type with a bigger value space? On Tue, Apr 12, 201

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Justin Deoliveira
Thanks David, that helps a lot. So to summarize the ask is to be able to store dates as milliseconds from the epoch, and have the geotools datastore map that to a java date type . With the current patch that logic is triggered is by using a domain type of “bigdate” in postgres. And because of the

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Justin Deoliveira
This was my finding as well… couldn’t make up what was going on here… which makes me think there is perhaps more to this patch on the GeoNode side? Rather than flying blind has anyone tried to reach out to Ian Schneider, who afaik is the original author of the patch? If not I can give that a shot

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Andrea Aime
On Tue, Apr 12, 2016 at 8:59 AM, Jody Garnett wrote: > Near as I can tell the point of this exercise is to provide a mapping for > bigdate: > > mappings.put("bigdate", XDate.class); > Err yeah but I'm still lost, I can't see any such type in postgresql, nor I can find one searching the inter

Re: [Geotools-devel] jdbc negative dates

2016-04-12 Thread Jody Garnett
> Right now the project is running a fork of geotools to have the following >> fix (from #997 ): >> >> Date converted = null; >> if (target == PostGISDialect.XDate.class) { >> converted = Converters.convert(expression.eva

Re: [Geotools-devel] jdbc negative dates

2016-04-09 Thread Andrea Aime
On Sat, Apr 9, 2016 at 11:55 AM, Simone Giannecchini < simone.giannecch...@geo-solutions.it> wrote: > > That's quite interesting can you elaborate on how they are using it? > E.g., > > calling it command line (safe) vs JNI in a Java multitheaded application > > (one glitch and the process is dead)

Re: [Geotools-devel] jdbc negative dates

2016-04-09 Thread Simone Giannecchini
On Sat, Apr 9, 2016 at 11:36 AM, Andrea Aime wrote: > On Sat, Apr 9, 2016 at 12:25 AM, Jody Garnett > wrote: >> >> I have been catching up with the GeoNode project this week (interestingly >> the project is using GDAL 2.0 which we were discussion earlier in the week). > > > That's quite interesti

Re: [Geotools-devel] jdbc negative dates

2016-04-09 Thread Andrea Aime
On Sat, Apr 9, 2016 at 12:25 AM, Jody Garnett wrote: > I have been catching up with the GeoNode project this week (interestingly > the project is using GDAL 2.0 which we were discussion earlier in the week). > That's quite interesting can you elaborate on how they are using it? E.g., calling it

[Geotools-devel] jdbc negative dates

2016-04-08 Thread Jody Garnett
I have been catching up with the GeoNode project this week (interestingly the project is using GDAL 2.0 which we were discussion earlier in the week). Right now the project is running a fork of geotools to have the following fix (from #997 ):