Re: Starting JNI wrappers - a few questions
Martin Desruisseaux <[email protected]>
| Newsgroups | gmane.comp.gis.proj-4.devel |
|---|---|
| Organization | Geomatys |
| Message-ID | <[email protected]> |
Thanks Even for the tips; I will design accordingly (pool of relatively long lived PJ_CONTEXT, encoding assumed UTF-8). More questions to come maybe next week. Regards, Martin Le 25/09/2019 à 17:27, Even Rouault a écrit : >> PJ_CONTEXT >> >> (...snip...) > You can use a PJ_CONTEXT created by one thread in another thread. The golden > rule is not to use in more than one thread at the same time as you stated > above. > >> Are PJ_CONTEXT expected to be short lived (...snip...) > Rather long lived. The PJ_CONTEXT caches the sqlite3 database handle, and even > higher level objects. So createOperations() performance would suffer if you > start from a new PJ_CONTEXT everytime. > >> Disposal at shutdown time >> >> (...snip...) > There shouldn't be any problem to just exit the JVM without terminating PROJ. > The sqlite3 handle is on a read-only file, and only read-only operations are > done, so nothing to corrupt. > >> Encoding of std::string >> >> (...snip...) > UTF-8 is more or less implied. The EPSG database is ingested from a UTF-8 > dump. People could potentially try to ingest non UTF-8 strings in import from > WKT, but we could/should just state in the documentation that all strings > ingested are expected to be UTF-8 (in which case all strings output by PROJ > will be UTF-8 as well) _______________________________________________ PROJ mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/proj