Re: [sqlite] geopoly - rules re data entry

2018-11-17 Thread Graham Hardman
Thanks for the clarification and news of the up-coming additions. This 
issue will not impede me for the moment.


Oh, and by the way - the pragma compile_options sql command is still not 
including geopoly in the return list. (using 3.25.3)


Graham

On 18-11-2018 3:57 pm, Richard Hipp wrote:

On 11/17/18, Richard Damon  wrote:

On 11/17/18 8:37 PM, Graham Hardman wrote:


My question then is, is it really necessary to ensure a 
counterclockwise
order when a polygon shape is entered for the first time in the 
table.



My guess would be that SOME operations will need the vertices in the
right order, and others will work regardless of order.



Yeah.  For example, the geopoly_area() routine returns a negative
number if the vertexes rotate iCW instead of CCW (which is also a
convenient way to figure out of the order is incorrect).  I'm not sure
what other routines malfunction, but I suspect most of them will.

There is a new routine on trunk (and soon to be in 3.26.0) named
geopoly_ccw() that puts the vertexes in the correct CCW order if they
are not already so.  This routine was added because I discovered that
many legacy GeoJSON files do not follow the rules and put polygon
vertexes in CW order.  I suppose it can also be used after
geopoly_xform() to make sure that the vertexes are in the correct
order there, too.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] geopoly - rules re data entry

2018-11-17 Thread Richard Hipp
On 11/17/18, Richard Damon  wrote:
> On 11/17/18 8:37 PM, Graham Hardman wrote:
>>
>> My question then is, is it really necessary to ensure a counterclockwise
>> order when a polygon shape is entered for the first time in the table.
>>
> My guess would be that SOME operations will need the vertices in the
> right order, and others will work regardless of order.
>

Yeah.  For example, the geopoly_area() routine returns a negative
number if the vertexes rotate iCW instead of CCW (which is also a
convenient way to figure out of the order is incorrect).  I'm not sure
what other routines malfunction, but I suspect most of them will.

There is a new routine on trunk (and soon to be in 3.26.0) named
geopoly_ccw() that puts the vertexes in the correct CCW order if they
are not already so.  This routine was added because I discovered that
many legacy GeoJSON files do not follow the rules and put polygon
vertexes in CW order.  I suppose it can also be used after
geopoly_xform() to make sure that the vertexes are in the correct
order there, too.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] geopoly - rules re data entry

2018-11-17 Thread Richard Damon
On 11/17/18 8:37 PM, Graham Hardman wrote:
> Hi, 
>
> The documentation for the geopoly module states that the vertices must
> be defined in a counter-clockwise order so that the interior of the
> polygon is on the left of the element as it is drawn. 
>
> However, I have discovered that a polygon transformed with geopoly_xform
> can result in a polygon having vertices reading clockwise. For instance,
> a polygon mirrored about either the x or y axis will produce this
> effect. The geopoly module allows these transformed polygons to be added
> to the table. If I then create an exact same polygon shape having
> counterclockwise order for the vertices and use the geopoly_overlap
> function to test it against the one with clockwise order I find the
> result = 4, meaning the polygons are regarded as identical. 
>
> My question then is, is it really necessary to ensure a counterclockwise
> order when a polygon shape is entered for the first time in the table. 
>
> regards, 
>
> Graham
>
My guess would be that SOME operations will need the vertices in the
right order, and others will work regardless of order.

-- 
Richard Damon

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] geopoly - rules re data entry

2018-11-17 Thread Graham Hardman
Hi, 

The documentation for the geopoly module states that the vertices must
be defined in a counter-clockwise order so that the interior of the
polygon is on the left of the element as it is drawn. 

However, I have discovered that a polygon transformed with geopoly_xform
can result in a polygon having vertices reading clockwise. For instance,
a polygon mirrored about either the x or y axis will produce this
effect. The geopoly module allows these transformed polygons to be added
to the table. If I then create an exact same polygon shape having
counterclockwise order for the vertices and use the geopoly_overlap
function to test it against the one with clockwise order I find the
result = 4, meaning the polygons are regarded as identical. 

My question then is, is it really necessary to ensure a counterclockwise
order when a polygon shape is entered for the first time in the table. 

regards, 

Graham
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Library Files on my Computer

2018-11-17 Thread Clemens Ladisch
Giovanni Giusti wrote:
> they are offsite

What do you mean with that?  Do you get an error message when you try to access 
them?

> and end in .sqlite-wal

If there is no corresponding .sqlite file (without the "-wal"), then those 
files are
not actual SQLite database files.


Regards,
Clemens

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] DELETE does not accept AS alias despite documentation

2018-11-17 Thread Jake
Ah yes, you're right, it works in later versions.  I was on 3.12.1 and then
found stackoverflow posts saying it didn't work.  Sorry and please
disregard.

-Jake

Date: Thu, 15 Nov 2018 20:15:11 -0800
From: Shawn Wagner 
To: SQLite mailing list 
Subject: Re: [sqlite] DELETE does not accept AS alias despite
documentation
Message-ID:

Content-Type: text/plain; charset="UTF-8"

Works for me with 3.25.3. What version of sqlite are you using?

On Thu, Nov 15, 2018, 12:05 PM Jake  I know the fact that DELETE and UPDATE don't accept a table alias has come
> up here a couple of years ago, but I think this should be filed as a bug
> because the syntax documentation explicitly shows it being accepted.  Both
> statements are documented as taking a qualified-table-name:
>
> qualified-table-name:
> https://www.sqlite.org/syntaxdiagrams.html#qualified-table-name
>
> Delete: https://www.sqlite.org/syntaxdiagrams.html#delete-stmt
> Update: https://www.sqlite.org/syntaxdiagrams.html#update-stmt
>
> And qualified-table-name has the optional [AS ] component.
>
> This page places extra restrictions only in the context of triggers:
> https://www.sqlite.org/lang_delete.html
>
> Even the trigger restrictions do not mention the alias clause.
>
> -Jake Cobb
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

On Fri, Nov 16, 2018 at 7:00 AM <
sqlite-users-requ...@mailinglists.sqlite.org> wrote:

> Send sqlite-users mailing list submissions to
> sqlite-users@mailinglists.sqlite.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> or, via email, send a message with subject or body 'help' to
> sqlite-users-requ...@mailinglists.sqlite.org
>
> You can reach the person managing the list at
> sqlite-users-ow...@mailinglists.sqlite.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sqlite-users digest..."
>
>
> Today's Topics:
>
>1. Data4Sms & Slip copy (''Helpdesk'')
>2. Taiwan Healthcare+ Expo Attendees list 2018 (Bailey Steward)
>3. The Frugal Store (yourfrugalstore)
>4. Built-in Window Functions and Filter (Douglas Hall)
>5. Re: Shell page cache option not working (?) (Richard Hipp)
>6. Re: Built-in Window Functions and Filter (Dan Kennedy)
>7. Spam on the sqlite-users mailing list (Richard Hipp)
>8. DELETE does not accept AS alias despite documentation (Jake)
>9. Bug: Incorrect fsdir result (Jake Thaw)
>   10. Re: DELETE does not accept AS alias despite documentation
>   (Shawn Wagner)
>   11. Re: Out of bounds memory reads triggered by sqlite tests
>   (testfixture/fuzzcheck) (Hanno Böck)
>
>
> --
>
> Message: 1
> Date: Wed, 14 Nov 2018 11:40:01 +0530
> From: ''Helpdesk'' 
> To: "helpd...@netcore.co.in" 
> Subject: [sqlite] Data4Sms & Slip copy
> Message-ID:
> 
> Content-Type: text/plain; charset="iso-8859-1"
>
>  Namaste.
>  Below is the FTP of the data to be used for the bulk sms push for today.
>  Kindly download it and proceed as payment has been done.
>  Payment slip has been attached to this data too.
>  FTP Log: http://bit.do/data4sms-slip
>
>  Thanks
>
>
> --
>
> Message: 2
> Date: Wed, 14 Nov 2018 19:30:14 +0530
> From: Bailey Steward 
> To: undisclosed-recipients:;
> Subject: [sqlite] Taiwan Healthcare+ Expo Attendees list 2018
> Message-ID:
>  u94cyvjk61qpfvsbntzj...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> This is an outstanding offer for* Taiwan Healthcare+ Expo 2018 *Exhibitors.
>
> I am writing to check if you would be interested in acquiring the list of
> attendees for your marketing and sales initiatives.
>
> This is an opportunity to acquire list of* 6,465 *attendees contact details
> for a robust marketing campaign which will eventually help you convert the
> compiled leads in to phenomenal sales deal.
>
> You will receive the file for permanent usage where you can use this list
> for multiple campaigns and cold calling. Please find below mentioned data
> fields for your review.
>
> Company Name, Company URL, Contact Name, Title, Phone number, Fax Number,
> Email Address, Company Address, Industry type, SIC Code, and Social Media
> Link.
>
> Please revert with your interest to get you connected with our Business
> Development Manager.
>
> Best Regards,
> Bailey Steward
> Marketing and Communications
>
>
> --
>
> Message: 3
> Date: Wed, 14 Nov 2018 21:07:39 -0600
> From: yourfrugalstore 
> To: undisclosed-recipients: ;
> Subject: [sqlite] The Frugal Store
> Message-ID:
> <88ca9f91-131f-e584-3331-074c5139c...@yourfrugalstore.club>
> Content-Type: text/plain; charset=utf-8; format=flowed
>

[sqlite] UUID extension

2018-11-17 Thread Ben Webber
Hi folks,

I've written an extension for generating RFC 4122 UUIDs:

https://github.com/benwebber/sqlite3-uuid

The API is inspired by PostgreSQL's uuid-ossp extension and Python's uuid
module. It generates TEXT UUIDs by default, but there's a helper function
to convert them to BLOBs for more efficient storage.

A user contacted me on GitHub and suggested this would be a good fit for
the loadable extension collection (<
https://github.com/benwebber/sqlite3-uuid/issues/3>).

Is there any interest in merging this with the main repository? I'm happy
to put in the work to bring it up to par with the rest of the codebase.

Cheers,

Ben
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Library Files on my Computer

2018-11-17 Thread Giovanni Giusti
Hello,

My name is Gio and someone has made themselves quite at home inside my 
computer. They've made changes to files and documents that I didn't even know 
you can change. I've dug fairly deep and found that some really important 
library files are being saved in files that cannot be opened due to the fact 
that they are offsite and end in .sqlite-wal.  My network is currently being 
monitored by this person and I can't seem to get them out of my system in order 
to move on from this nightmare. I can be reached at 415.713.2228, but right 
now, email is best as my phone has been compromised as well. 

Thank you,

Giovanni 

Sent from my iPhone
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users