Thank you guys, i guess i'll go with the gt-geojsonstore

Il giorno sab 20 nov 2021 alle ore 08:13 Andrea Aime <
andrea.a...@geosolutionsgroup.com> ha scritto:

> The module is considered for eventual removal, will be replaced by
> https://github.com/geotools/geotools/tree/main/modules/unsupported/geojsonstore
> Despite the name, the module contains support for reading GeoJSON files
> without going through the DataStore interface.
> GeoServer is being gradually migrated to gt-geojsonstore, I'd recommend to
> do the same. gt-geojson is an unsupported module, you might
> not get much warning when the axe is about to drop (we won't know when,
> everything around these two modules is happening
> in volunteer time).
>
> Cheers
> Andrea
>
>
> On Fri, Nov 19, 2021 at 7:55 PM Jody Garnett <jody.garn...@gmail.com>
> wrote:
>
>> There is certainly room for improvement Lrenzo, you could probably
>> downgrade that exception to a warning for example.
>>
>> Looking at String toJSONString(SimpleFeature feature)
>> <https://github.com/geotools/geotools/blob/main/modules/unsupported/geojson/src/main/java/org/geotools/geojson/feature/FeatureJSON.java#L546>
>> is has:
>>
>>                 Object value = feature.getAttribute(i);
>>
>>                 if (!encodeNullValues && value == null) {
>>                     // skip
>>                     continue;
>>                 }
>>
>>                 attributesWritten = true;
>>
>> Does that answer your question?  It looks like it skips writing null
>> values when writing json out as a string.
>>
>> --
>> Jody Garnett
>>
>>
>> On Tue, 16 Nov 2021 at 08:05, Lorenzo Di Giacomo <loridi...@gmail.com>
>> wrote:
>>
>>> Hi all, i have 2 question:
>>> 1) what does setEncodeNullValues do? Since i can read a json with null
>>> values if the field is true or false, so i don't understand what actually
>>> do.
>>>
>>> 2) given a FeatureType, created manually, is there a way to read a JSON
>>> but taking only the properties declared in the FeatureType and skipping the
>>> others not declared? Because now, if i dont declare ALL properties that
>>> existits in the files, it gives me an Exception.
>>>
>>> Thank you for your help!!
>>> _______________________________________________
>>> GeoTools-GT2-Users mailing list
>>> GeoTools-GT2-Users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>
>> _______________________________________________
>> GeoTools-GT2-Users mailing list
>> GeoTools-GT2-Users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>
>
> --
>
> Regards,
>
> Andrea Aime
>
> ==
> GeoServer Professional Services from the experts!
>
> Visit http://bit.ly/gs-services-us for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions Group
> phone: +39 0584 962313
>
> fax:     +39 0584 1660272
>
> mob:   +39  333 8128928
>
> https://www.geosolutionsgroup.com/
>
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
> precisa che ogni circostanza inerente alla presente email (il suo
> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>
> This email is intended only for the person or entity to which it is
> addressed and may contain information that is privileged, confidential or
> otherwise protected from disclosure. We remind that - as provided by
> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
> e-mail or the information herein by anyone other than the intended
> recipient is prohibited. If you have received this email by mistake, please
> notify us immediately by telephone or e-mail
>
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to