Giter VIP home page Giter VIP logo

Comments (6)

jericks avatar jericks commented on August 19, 2024

I would suggest using the Directory Workspace directly. Really strange, that it's trying to load spatialite native library.

def tramosXsnaspe = tramos.intersection(snaspe)

def resultsWorkspaceName = "./Toltén"
def resultsWorkspace = new geoscript.workspace.Directory(new File(resultsWorkspaceName))

def tramosXsnaspeFileName = "tramosXsnaspe"
resultsWorkspace.add(tramosXsnaspe, tramosXsnaspeFileName)

from geoscript-groovy.

monetschemist avatar monetschemist commented on August 19, 2024

Jared, thanks for the very rapid reply and apologies for my slow uptake
(alligators quite deep right now).

I made the change you suggest and one of the spatialite messages goes away
but not both. This second message appears to be caused by the statement

resultsWorkspace.add(tramosXsnaspe, tramosXsnaspeFileName)

Interesting that there is a file called "tramosXsnaspe.fix" created which
appears to be data. Looking at it, I don't see any obvious strings. The
first few bytes are:

0000000 001 \0 \0 \0 \0 \0 \0 \0 g \0 \0 \0 \0 \0 \0 \0
0000020 \0 \0 \0 \0 001 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000040 002 \0 \0 \0 001 \0 \0 \0 \0 \0 \0 \0 003 \0 \0 \0
0000060 002 \0 \0 \0 \0 \0 \0 \0 004 \0 \0 \0 003 \0 \0 \0
0000100 \0 \0 \0 \0 005 \0 \0 \0 004 \0 \0 \0 \0 \0 \0 \0
0000120 006 \0 \0 \0 005 \0 \0 \0 \0 \0 \0 \0 \a \0 \0 \0
0000140 006 \0 \0 \0 \0 \0 \0 \0 \b \0 \0 \0 \a \0 \0 \0
0000160 \0 \0 \0 \0 \t \0 \0 \0 \b \0 \0 \0 \0 \0 \0 \0
0000200 \n \0 \0 \0 \t \0 \0 \0 \0 \0 \0 \0 \v \0 \0 \0

I wonder if this is related somehow; I've never heard of a .fix file as
part of a shapefile collection.

On Mon, Apr 4, 2016 at 7:50 PM, Jared Erickson [email protected]
wrote:

I would suggest using the Directory Workspace directly. Really strange,
that it's trying to load spatialite native library.

def tramosXsnaspe = tramos.intersection(snaspe)

def resultsWorkspaceName = "./Toltén"
def resultsWorkspace = new geoscript.workspace.Directory(new
File(resultsWorkspaceName))

def tramosXsnaspeFileName = "tramosXsnaspe"
resultsWorkspace.add(tramosXsnaspe, tramosXsnaspeFileName)


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#31 (comment)

Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.

from geoscript-groovy.

monetschemist avatar monetschemist commented on August 19, 2024

My project is done for now so I have a bit of time to try to sort some of these things out.

First of all, the .fix file is a known kind of shapefile-related artefact, apparently a kind of index for searching by feature id.

Second, the error:

java.lang.UnsatisfiedLinkError: /tmp/spatialite-3.7.22.4-libspatialitejdbc.so: libproj.so.0: cannot open shared object file: No such file or directory

The only libproj.so on my system (recently upgraded to Ubuntu 16.04) are:

/usr/lib/x86_64-linux-gnu/libproj.so.9
/usr/lib/x86_64-linux-gnu/libproj.so.9.1.0

Do you have any thoughts on this matter, Jared?

from geoscript-groovy.

jericks avatar jericks commented on August 19, 2024

I think the GeoTools docs explain what is going on here:

http://docs.geotools.org/stable/userguide/library/jdbc/spatialite.html

I believe you need to use the specifically built native libraries.

from geoscript-groovy.

monetschemist avatar monetschemist commented on August 19, 2024

Jared, thank you very much for this pointer. It has made the error message
go away.

Specifically, what I did:

  1. downloaded the zip file of proj and geos and unzipped it (which
    creates a creates a directory called 'lib');
  2. moved that directory into /usr/local/lib and renamed it to geotools
  3. ran the following:

$ export LD_LIBRARY_PATH=/usr/local/lib/geotools
$ geoscript-groovy -Djava.library.path=/usr/local/lib/geotools test5.groovy
loading ../Hidros_finales_corregidos/Toltén/tramos.shp...
Apr 28, 2016 3:46:39 PM org.geotools.image.ImageWorker
INFO: Warp/affine reduction enabled: true
loading ../../BBNN/SNASPE.shp...
calculating intersection...
adding tramosXsnaspe to workspace ./Test...
...done.
$

Message gone!

So now my only doubt is that those libraries are OLD - 2012 vintage.
libgeos in Ubuntu 16.04 is 3.5.0 whereas in the zip file from the site it's
3.1.1

Maybe it's time to look at building something from source...

Anyway! Thank you tons for this. I'm really looking forward to pushing
geoscript a bit!

On Thu, Apr 28, 2016 at 1:34 AM, Jared Erickson [email protected]
wrote:

I think the GeoTools docs explain what is going on here:

http://docs.geotools.org/stable/userguide/library/jdbc/spatialite.html

I believe you need to use the specifically built native libraries.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#31 (comment)

Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.

from geoscript-groovy.

jericks avatar jericks commented on August 19, 2024

Excellent! Thank you for sharing your solution!

from geoscript-groovy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.