[ 
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 [[email protected]],
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to