我找到了一个有用的工具,可以使用geotools将 .csv 文件转换为形状文件:
但是我在运行它时遇到问题,出现以下 maven 错误:
无法在项目教程中执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli):命令执行失败。进程退出并出现错误:1(退出值:1)
这一行有一个错误:
final SimpleFeatureType TYPE = DataUtilities.createType(
"Location", // <- the name for our feature type
"location:Point:srid=4326," + // <- the geometry attribute: Point type
"name:String" // <- a String attribute
);
Run Code Online (Sandbox Code Playgroud)
错误:
线程“main”org.geotools.feature.SchemaException 中的异常:解码 srs 时出错
我的 POM 文件是这样的:
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.geotools</groupId>
<artifactId>tutorial</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>tutorial</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>11-SNAPSHOT</geotools.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId> …Run Code Online (Sandbox Code Playgroud) 我尝试安装一个数据包进行NTLM身份验证,我收到此错误
make:apxs:找不到命令
我在ubuntu 10.10上安装了apache2我也安装了:apache2-prefork-dev,apache2-threaded-dev,apache2-mod-php5和apache2-mod-perl2.我也进行了apt-get升级
但我仍然得到错误!如果我试图找到apxs,他一无所获.如果我尝试执行apxs我得到一个错误该命令不存在,如果我尝试apxs2作为命令,他认出它.
我试图将makefile中的命令从apxs更改为apxs2,但这只会给我更多的错误
希望有人可以帮忙!
我试图从Ruby on Rails应用程序执行这样的命令:
sudo服务squid3重启
如果我尝试使用此代码:
output = ´sudo service squid3 retsart´
Run Code Online (Sandbox Code Playgroud)
它不起作用,在控制台中我看到linux要求输入密码.如何使用此命令传递密码?或者其他建议......
我试图将FactoryGirl转换为FactoryBot。这应该不是一个大问题,但我无法使其正常工作。代码:
已添加到宝石文件
gem 'factory_bot'
Run Code Online (Sandbox Code Playgroud)
已添加到spec_helper
FactoryBot.definition_file_paths = %w(spec/factories)
FactoryBot.find_definitions
config.include FactoryBot::Syntax::Methods
Run Code Online (Sandbox Code Playgroud)
厂
FactoryBot.define do
factory :user do
first_name 'John'
last_name 'Doe'
birthdate { 21.years.ago }
admin false
end
end
Run Code Online (Sandbox Code Playgroud)
当我尝试运行rspec测试时,出现以下错误:
NoMethodError: undefined method 'first_name' in 'user' factory!
Method_missing at C:/jruby-9.1.17.0/lib/ruby/gems/shared/gems/factory_bot-5.0.2/lib/factory_bot/definition_proxy.rb:97
block in (root) at <path to factory>
Run Code Online (Sandbox Code Playgroud)
在我看来,gem已正确加载到项目中,并执行了factoryBot代码。但是由于某种原因,它无法识别工厂的结构。
注意:-我做了捆绑安装/更新