[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-30 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUCENE-7936-code.patch

Attached a new patch using hashmaps for the lookup. I am creating two as I need 
to do it in both directions.

Thanks!

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Fix For: 6.7, master (8.0), 7.1
>
> Attachments: factory.patch, GeoBinaryCodec.patch, 
> LUCENE-7936-code.patch, LUCENE-7936-code.patch, 
> LUCENE-7936-GeoComplexPolygon.patch, LUCENE-7936.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-30 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUCENE-7936-code.patch

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Fix For: 6.7, master (8.0), 7.1
>
> Attachments: factory.patch, GeoBinaryCodec.patch, 
> LUCENE-7936-code.patch, LUCENE-7936-GeoComplexPolygon.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, LUCENE-7936.patch, 
> LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-30 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: (was: LUCENE-7936-code.patch)

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Fix For: 6.7, master (8.0), 7.1
>
> Attachments: factory.patch, GeoBinaryCodec.patch, 
> LUCENE-7936-code.patch, LUCENE-7936-GeoComplexPolygon.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, LUCENE-7936.patch, 
> LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-29 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUCENE-7936-code.patch

Attached the patch. I could not run precommit locally because some errors in 
some other classes but I want to check if the apporoach I am taking is OK with 
you.

I cannot add the lookup table for supported classes in the interface so I 
created a protected class to contain it. I am actually using a List to hold the 
classes. Is that ok with you?

Thanks!

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Fix For: 6.7, master (8.0), 7.1
>
> Attachments: factory.patch, GeoBinaryCodec.patch, 
> LUCENE-7936-code.patch, LUCENE-7936-GeoComplexPolygon.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, LUCENE-7936.patch, 
> LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-29 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: factory.patch

Hi [~daddywri],

It have noticed that the serialization constructor is missing in 
GeoCompositeMembershipShape class.

I have been checking as the performance and I noticed that if we codify the 
class name into a byte, deserialization of objects can be up to 5 times faster. 
I think we should explore that option.

I am attaching a factory that codifies the class into a byte. 0 to 127 is 
reserve for internal classes and -128 to -1 to user define classes. To make 
this work for objects that serialize other objects we would need to pass the 
factory into the constructor. 

Anyway before going to details I want to check if you are ok to explore other 
solutions. I really like the simplicity of the current implementation but when 
I saw that reading GeoPoints can be 5 time faster, I though it is worthy at 
least a thought. 

Let me know what you think.

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Fix For: 6.7, master (8.0), 7.1
>
> Attachments: factory.patch, GeoBinaryCodec.patch, 
> LUCENE-7936-GeoComplexPolygon.patch, LUCENE-7936.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-25 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUCENE-7936-GeoComplexPolygon.patch

Attached implementation of equals and hashcode in GeoComplexPolygons and added 
this type o shape to RandomBinaryCodecTest.

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, 
> LUCENE-7936-GeoComplexPolygon.patch, LUCENE-7936.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-25 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUCENE-7936-test.patch

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-25 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: (was: LUECENE-7936-test.patch)

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, LUCENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-25 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUECENE-7936-test.patch

Thanks [~daddywri],

I attached a patch with a test for serialization. It showed few issues:

1) Holes can be null and need to be dealt with.
2) Java does not allow to cast one type of array to another type of array. 

Regarding the current implementation, I think we should not serialize GeoPoint 
as an object and make it more compact. Objects should just serialize GeoPoints 
as two doubles. For example for a polygon with 6 points would save 6 GeoPoint 
strings. And in fact I think points should not be serializable at all, only 
classes that implement PlanetObject. what do you think?

Cheers,

I.

By the way, should not  writeObject and readObject be public?





> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, LUECENE-7936-test.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-23 Thread Karl Wright (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Wright updated LUCENE-7936:

Attachment: LUCENE-7936.patch

This patch moves everything of import into SerializedObject. That's nice 
because a wide variety of objects can then be serializable in this framework.
 

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, LUCENE-7936.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-23 Thread Karl Wright (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Wright updated LUCENE-7936:

Attachment: LUCENE-7936.patch

[~ivera], I took the tack of not serializing the planetmodel, but requiring it 
on deserialization.  This will give a much more compact representation.  The 
attached patch is not complete, and still needs much work (including actual 
implementations for most objects except GeoPoint).

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, 
> LUCENE-7936.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-22 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: (was: Spatial4j.patch)

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-22 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: Spatial4j.patch

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-22 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: GeoBinaryCodec.patch
Spatial4j.patch

I am focusing on re-using the RecursiveTreePrefixStrategy on Lucene + 
serialized strategy which requires Geo3dShapes to be wrapped into Spatial4j 
shapes. I attach what it is now needed to have a basic implementation. I have 
created a GeoBinaryCodec and then the implementation is trivial (attached as 
well with test). 

I understand that this is not the ideal implementation and it would be good to 
have a proper integration where the model for shapes is the Geo3d model.

I like your idea of the iterators and I beleive this is something we should 
expose as it can be valuable for other people. I will try to implement it.

Thanks!

I.



> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
>Assignee: Karl Wright
> Attachments: GeoBinaryCodec.patch, LUCENE-7936.patch, Spatial4j.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-7936) Extend Geoshape interfaces so objects can be copied/serialized

2017-08-21 Thread Ignacio Vera (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-7936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignacio Vera updated LUCENE-7936:
-
Attachment: LUCENE-7936.patch

Attached the proposed patch.

Note that I have called the new GeoPolygon interface GeoBasicPolygon which I do 
not particullary like but I could not come up with a better name.

GeoPolygonFactory has been extended to accept internalEdgesFlag.

A random test is added for copying GeoShapes.

> Extend Geoshape interfaces so objects can be copied/serialized
> --
>
> Key: LUCENE-7936
> URL: https://issues.apache.org/jira/browse/LUCENE-7936
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/spatial3d
>Reporter: Ignacio Vera
> Attachments: LUCENE-7936.patch
>
>
> Hi [~david.wri...@bksv.com],
> I would like to propose to extends the GeoShape interfaces to be able to 
> copy/serialized the objects. The current status and  propose change is as 
> following:
> GeoPoint: It can be serialized by using x, y, z
> GeoCircle:  It can be serialized by using getCenter() and getRadius() and 
> getPlanetModel()
> GeoCompositeShape: It can be serialized by accesing shapes using size() and 
> GetShape(int index)
> GeoPath: add methods to the interface getPoints() and getCutoffAngle()
> GeoPolygon: This is the most complicated one as we have different types:
>1.- GeoCompositePolygon is just a composite
>2.- GeoConcavePolygon and GeoConvexPolygon: Create a new interface for 
> those polygons which exposes the points, holes, internaledges and 
> concavity/convexity
>3.- GeoComplexPolygons: Do nothing, they are too complex to be serialize??
> I am intersested in accesing the discreatization of the polygons into convex 
> and concave ones for other reasons as well. I think this should be expose as 
> they end result can be used for other use cases.
> Cheers,
> I.
>   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org