打开大型数据集并在Java中实例化数据时会遇到麻烦



我正在尝试从Java中的GIS数据的文本文件中读取,实例化每行数据,然后对其进行排序,搜索和插入数据。我一直在遇到问题:"在Java.util.scanner.next(未知来源(",但无法解决此问题。我还想知道是否有建议这样做的建议。

我尝试使用一个数据类,其中设置了所有需要访问的变量,创建了getters和setters以及覆盖。然后,我创建了一个新的数据数组,并使用了if(input.hasNext()),在其中设置了每个变量,然后创建了GISDATA的新实例。

public class GISRunner {
    /**
     * @param args
     */
    public static void main(String[] args) throws FileNotFoundException {
        File file = new File("C:\Users\Toby\Desktop\GIS.txt");
        Scanner input = new Scanner(file);
        input.useDelimiter("||n");
        GISData[] datas = new GISData[0];
        if(input.hasNext()) {
            int featureId = input.nextInt();
            String featureName = input.next();
            String featureClass = input.next();
            String stateCode = input.next();
            int stateId = input.nextInt();
            String countyName = input.next();
            int countyId = input.nextInt();
            String primaryLatitudeDMS = input.next();
            String primaryLongitudeDMS = input.next();
            double primaryLatitudeDecimal = Double.valueOf(input.next().substring(1));
            double primaryLongitudeDecimal = Double.valueOf(input.next().substring(1));
            String sourceLatitudeDMS = input.next();
            String sourceLongitudeDMS = input.next();
            double sourceLatitudeDecimal = Double.valueOf(input.next().substring(1));
            double sourceLongitudeDecimal = Double.valueOf(input.next().substring(1));
            int elevationMeters = input.nextInt();
            int elevationFeet = input.nextInt();
            String mapName = input.next();
            GISData newGISData = new GISData(featureId, featureName, featureClass, stateCode,
                    stateId, countyName, countyId, primaryLatitudeDMS, primaryLongitudeDMS, 
                    primaryLatitudeDecimal, primaryLongitudeDecimal, sourceLatitudeDMS, 
                    sourceLongitudeDMS, sourceLatitudeDecimal, sourceLongitudeDecimal, elevationMeters, 
                    elevationFeet, mapName);
            datas = addGISData(datas, newGISData);
        }
        for (GISData data : datas) {
            System.out.println(data);
        }
    }
    public static GISData[] addGISData(GISData[] datas, GISData dataToAdd) {
        GISData[] newGISData = new GISData[datas.length + 1 ];
        System.arraycopy(datas, 0, newGISData, 0, datas.length);
        newGISData[newGISData.length - 1 ] = dataToAdd;
        return newGISData;
    }
}

public class GISData implements Comparable<GISData> {
    public static enum SortByType {CountyName,
                                    FeatureName,
                                    PrimaryLatitude,
                                    PrimaryLongitude,
                                    SourceLatitude,
                                    SourceLongitude,
                                    ElevationFeet};
    private int featureId;
    private String featureName;
    private String featureClass;
    private String stateCode;
    private int stateId;
    private String countyName;
    private int countyId;
    private String primaryLatitudeDMS;
    private String primaryLongitudeDMS;
    private double primaryLatitudeDecimal;
    private double primaryLongitudeDecimal;
    private String sourceLatitudeDMS;
    private String sourceLongitudeDMS;
    private double sourceLatitudeDecimal;
    private double sourceLongitudeDecimal;
    private int elevationMeters;
    private int elevationFeet;
    private String mapName;
    private Date createdDate;
    private Date modifiedDate;
    private SortByType[] sortBy;

    public GISData(int featureId2, String featureName2, String featureClass2, String stateCode2, int stateId2,
            String countyName2, int countyId2, String primaryLatitudeDMS2, String primaryLongitudeDMS2,
            double primaryLatitudeDecimal2, double primaryLongitudeDecimal2, String sourceLatitudeDMS2, String sourceLongitudeDMS2, double sourceLatitudeDecimal2,
            double sourceLongitudeDecimal2, int elevationMeters2, int elevationFeet2, String mapName2) {
        featureId = featureId2;
        featureName2 = featureName;
        featureClass2 = featureClass;
        stateCode2 = stateCode;
        stateId2 = stateId;
        countyName2 = countyName;
        countyId2 = countyId;
        primaryLatitudeDMS2 = primaryLatitudeDMS;
        primaryLongitudeDMS2 = primaryLongitudeDMS;
        primaryLatitudeDecimal2 = primaryLatitudeDecimal;
        primaryLongitudeDecimal2 = primaryLongitudeDecimal;
        sourceLatitudeDMS2 = sourceLatitudeDMS;
        sourceLongitudeDMS2 = sourceLongitudeDMS;
        sourceLatitudeDecimal2 = sourceLatitudeDecimal;
        sourceLongitudeDecimal2 = sourceLongitudeDecimal;
        elevationMeters2 = elevationMeters;
        elevationFeet2 = elevationFeet;
        mapName2 = mapName;
    }
    /**
     * @return the featureId
     */
    public int getFeatureId() {
        return featureId;
    }
    /**
     * @param featureId the featureId to set
     */
    public void setFeatureId(int featureId) {
        this.featureId = featureId;
    }
    /**
     * @return the featureName
     */
    public String getFeatureName() {
        return featureName;
    }
    /**
     * @param featureName the featureName to set
     */
    public void setFeatureName(String featureName) {
        this.featureName = featureName;
    }
    /**
     * @return the featureClass
     */
    public String getFeatureClass() {
        return featureClass;
    }
    /**
     * @param featureClass the featureClass to set
     */
    public void setFeatureClass(String featureClass) {
        this.featureClass = featureClass;
    }
    /**
     * @return the stateCode
     */
    public String getStateCode() {
        return stateCode;
    }
    /**
     * @param stateCode the stateCode to set
     */
    public void setStateCode(String stateCode) {
        this.stateCode = stateCode;
    }
    /**
     * @return the stateId
     */
    public int getStateId() {
        return stateId;
    }
    /**
     * @param stateId the stateId to set
     */
    public void setStateId(int stateId) {
        this.stateId = stateId;
    }
    /**
     * @return the countyName
     */
    public String getCountyName() {
        return countyName;
    }
    /**
     * @param countyName the countyName to set
     */
    public void setCountyName(String countyName) {
        this.countyName = countyName;
    }
    /**
     * @return the countyId
     */
    public int getCountyId() {
        return countyId;
    }
    /**
     * @param countyId the countyId to set
     */
    public void setCountyId(int countyId) {
        this.countyId = countyId;
    }
    /**
     * @return the primaryLatitudeDMS
     */
    public String getPrimaryLatitudeDMS() {
        return primaryLatitudeDMS;
    }
    /**
     * @param primaryLatitudeDMS the primaryLatitudeDMS to set
     */
    public void setPrimaryLatitudeDMS(String primaryLatitudeDMS) {
        this.primaryLatitudeDMS = primaryLatitudeDMS;
    }
    /**
     * @return the primaryLongitudeDMS
     */
    public String getPrimaryLongitudeDMS() {
        return primaryLongitudeDMS;
    }
    /**
     * @param primaryLongitudeDMS the primaryLongitudeDMS to set
     */
    public void setPrimaryLongitudeDMS(String primaryLongitudeDMS) {
        this.primaryLongitudeDMS = primaryLongitudeDMS;
    }
    /**
     * @return the primaryLatitudeDecimal
     */
    public double getPrimaryLatitudeDecimal() {
        return primaryLatitudeDecimal;
    }
    /**
     * @param primaryLatitudeDecimal the primaryLatitudeDecimal to set
     */
    public void setPrimaryLatitudeDecimal(double primaryLatitudeDecimal) {
        this.primaryLatitudeDecimal = primaryLatitudeDecimal;
    }
    /**
     * @return the primaryLongitudeDecimal
     */
    public double getPrimaryLongitudeDecimal() {
        return primaryLongitudeDecimal;
    }
    /**
     * @param primaryLongitudeDecimal the primaryLongitudeDecimal to set
     */
    public void setPrimaryLongitudeDecimal(double primaryLongitudeDecimal) {
        this.primaryLongitudeDecimal = primaryLongitudeDecimal;
    }
    /**
     * @return the sourceLatitudeDMS
     */
    public String getSourceLatitudeDMS() {
        return sourceLatitudeDMS;
    }
    /**
     * @param sourceLatitudeDMS the sourceLatitudeDMS to set
     */
    public void setSourceLatitudeDMS(String sourceLatitudeDMS) {
        this.sourceLatitudeDMS = sourceLatitudeDMS;
    }
    /**
     * @return the sourceLongitudeDMS
     */
    public String getSourceLongitudeDMS() {
        return sourceLongitudeDMS;
    }
    /**
     * @param sourceLongitudeDMS the sourceLongitudeDMS to set
     */
    public void setSourceLongitudeDMS(String sourceLongitudeDMS) {
        this.sourceLongitudeDMS = sourceLongitudeDMS;
    }
    /**
     * @return the sourceLatitudeDecimal
     */
    public double getSourceLatitudeDecimal() {
        return sourceLatitudeDecimal;
    }
    /**
     * @param sourceLatitudeDecimal the sourceLatitudeDecimal to set
     */
    public void setSourceLatitudeDecimal(double sourceLatitudeDecimal) {
        this.sourceLatitudeDecimal = sourceLatitudeDecimal;
    }
    /**
     * @return the sourceLongitudeDecimal
     */
    public double getSourceLongitudeDecimal() {
        return sourceLongitudeDecimal;
    }
    /**
     * @param sourceLongitudeDecimal the sourceLongitudeDecimal to set
     */
    public void setSourceLongitudeDecimal(double sourceLongitudeDecimal) {
        this.sourceLongitudeDecimal = sourceLongitudeDecimal;
    }
    /**
     * @return the elevationMeters
     */
    public int getElevationMeters() {
        return elevationMeters;
    }
    /**
     * @param elevationMeters the elevationMeters to set
     */
    public void setElevationMeters(int elevationMeters) {
        this.elevationMeters = elevationMeters;
    }
    /**
     * @return the elevationFeet
     */
    public int getElevationFeet() {
        return elevationFeet;
    }
    /**
     * @param elevationFeet the elevationFeet to set
     */
    public void setElevationFeet(int elevationFeet) {
        this.elevationFeet = elevationFeet;
    }
    /**
     * @return the mapName
     */
    public String getMapName() {
        return mapName;
    }
    /**
     * @param mapName the mapName to set
     */
    public void setMapName(String mapName) {
        this.mapName = mapName;
    }
    /**
     * @return the createdDate
     */
    public Date getCreatedDate() {
        return createdDate;
    }
    /**
     * @param createdDate the createdDate to set
     */
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }
    /**
     * @return the modifiedDate
     */
    public Date getModifiedDate() {
        return modifiedDate;
    }
    /**
     * @param modifiedDate the modifiedDate to set
     */
    public void setModifiedDate(Date modifiedDate) {
        this.modifiedDate = modifiedDate;
    }
    /**
     * @return the sortBy
     */
    public SortByType[] getSortBy() {
        return sortBy;
    }
    /**
     * @param sortBy the sortBy to set
     */
    public void setSortBy(SortByType[] sortBy) {
        this.sortBy = sortBy;
    }
    @Override
    public int compareTo(GISData o) {
        /**
         * Make sure to complete this section in such a way that the 
         * type of comparison can easily be changed to factor in the different 
         * types of comparisons you need to make. I've given you a mechanism 
         * in the class to essentially select the comparison type. You can use that 
         * or you could code different methods, call those methods from here 
         * and comment out the methods you won't use. It's up to you.
         */
        return 0;
    }
    @Override 
    public String toString() {
        return String.format("ID: %srnName: %srnClass: %srn");
    }
}

我期望我加载的每个数据实例的输出。尽管这是一个巨大的数据集,但我只是希望能够将数据加载到程序中。另外,如果有人对我可以编写的方法有任何建议,以有效地分类和搜索数据,我将不胜感激。

(数据集我正在使用:https://s3.us-east-1.amazonaws.com/blackboard.learn.xythos.prod/5744b9beb8ccb/8090292?2A%3DUTF-8%27%27CA_FEATURE_20190301.TXT&amp; andp; andp; wends-content-type = text%2fplain&amp; x-amz-algorithm = aws4-hmac-sha256X-AMZ-Exires = 21599&amp; x-amz-Credential = akiail7wqydoohazjgwq%2F20190525%2FUS-EAST-1%2FS3%2FAWS4_REQUEST 9632E5248655B149EF56F7E3(

apache commons csv

我让Apache Commons CSV库做我的文本文件的琐事。(注意:Javadoc在这里 - 他们的主页上的链接打破了。(

i从CSVFormat.TDF格式定义开始,然后将其更改为期望垂直条(PIPE,|(而不是Tab字符作为定界符。

我使用枚举来命名输入数据的所有字段。但这是可选的,您可以使用字符串名称。

提防浮点类型double以进行速度进行精确度。如果要保持数字完整,请使用BigDecimal

通过使用对象而不是原语,我们可以使用null来显示您的输入缺少数据的位置。

我使用三元运算符来测试零值。Ternary只是使用:

的语法,将if-the-else语句折叠成一行
result = test ? valueToUseIfTestIsTrue : valueToUseIfTestIsFalse ; 

示例:如果米的高程是一个空字符串,请记录一个空字符串。否则,将传入的字符串解析为Integer对象。

Integer ELEV_IN_M = record.get( FIELD.ELEV_IN_M ).isBlank() ? null : Integer.valueOf( record.get( FIELD.ELEV_IN_M ) );

String::isBlank方法是Java 11中的新方法。它针对一个空字符串或完全由空格字符制成的字符串测试。对于较早的Java,请在Java 6和更晚的Java中替换为String::isEmpty。您的数据似乎只有空字符串,没有空格,但我没有验证此观察结果。

跳过getter/setter方法。只需使用public成员变量,直到所有其他代码都在起作用为止,直到您有特定的理由来访问访问器方法。

为了使编写此演示代码的更快工作,我只是复制了您的数据文件的提交名称,所有大写。我没有打扰每个规范爪哇的骆驼案。

这是一个完整的工作示例,在main方法中带有演示的一个大班上。

package work.basil.example;
import org.apache.commons.csv.*;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.math.BigDecimal;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.StringJoiner;
public class Gis
{
    public enum FIELD
    {
        FEATURE_ID, FEATURE_NAME, FEATURE_CLASS, STATE_ALPHA, STATE_NUMERIC, COUNTY_NAME, COUNTY_NUMERIC, PRIMARY_LAT_DMS, PRIM_LONG_DMS, PRIM_LAT_DEC, PRIM_LONG_DEC, SOURCE_LAT_DMS, SOURCE_LONG_DMS, SOURCE_LAT_DEC, SOURCE_LONG_DEC, ELEV_IN_M, ELEV_IN_FT, MAP_NAME, DATE_CREATED, DATE_EDITED
    }
    public String FEATURE_NAME, FEATURE_CLASS, STATE_ALPHA, STATE_NUMERIC, COUNTY_NAME, COUNTY_NUMERIC, PRIMARY_LAT_DMS, PRIM_LONG_DMS, SOURCE_LAT_DMS, SOURCE_LONG_DMS, MAP_NAME;
    public Integer FEATURE_ID, ELEV_IN_M, ELEV_IN_FT;
    public BigDecimal PRIM_LAT_DEC, PRIM_LONG_DEC, SOURCE_LAT_DEC, SOURCE_LONG_DEC;
    public LocalDate DATE_CREATED, DATE_EDITED;
    // Constructor
    public Gis ( Integer FEATURE_ID , String FEATURE_NAME , String FEATURE_CLASS , String STATE_ALPHA , String STATE_NUMERIC , String COUNTY_NAME , String COUNTY_NUMERIC , String PRIMARY_LAT_DMS , String PRIM_LONG_DMS , BigDecimal PRIM_LAT_DEC , BigDecimal PRIM_LONG_DEC , String SOURCE_LAT_DMS , String SOURCE_LONG_DMS , BigDecimal SOURCE_LAT_DEC , BigDecimal SOURCE_LONG_DEC , Integer ELEV_IN_M , Integer ELEV_IN_FT , String MAP_NAME , LocalDate DATE_CREATED , LocalDate DATE_EDITED )
    {
        Objects.requireNonNull( FEATURE_ID ); // … and so on.
        this.FEATURE_ID = FEATURE_ID;
        this.FEATURE_NAME = FEATURE_NAME;
        this.FEATURE_CLASS = FEATURE_CLASS;
        this.STATE_ALPHA = STATE_ALPHA;
        this.STATE_NUMERIC = STATE_NUMERIC;
        this.COUNTY_NAME = COUNTY_NAME;
        this.COUNTY_NUMERIC = COUNTY_NUMERIC;
        this.PRIMARY_LAT_DMS = PRIMARY_LAT_DMS;
        this.PRIM_LONG_DMS = PRIM_LONG_DMS;
        this.PRIM_LAT_DEC = PRIM_LAT_DEC;
        this.PRIM_LONG_DEC = PRIM_LONG_DEC;
        this.SOURCE_LAT_DMS = SOURCE_LAT_DMS;
        this.SOURCE_LONG_DMS = SOURCE_LONG_DMS;
        this.SOURCE_LAT_DEC = SOURCE_LAT_DEC;
        this.SOURCE_LONG_DEC = SOURCE_LONG_DEC;
        this.ELEV_IN_M = ELEV_IN_M;
        this.ELEV_IN_FT = ELEV_IN_FT;
        this.MAP_NAME = MAP_NAME;
        this.DATE_CREATED = DATE_CREATED;
        this.DATE_EDITED = DATE_EDITED;
    }
    // -------|  Object  |-----------------------
    @Override
    public String toString ()
    {
        return new StringJoiner( " | " , Gis.class.getSimpleName() + "{ " , " }" )
                .add( "FEATURE_ID='" + this.FEATURE_ID + "'" )
                .add( "FEATURE_NAME='" + this.FEATURE_NAME + "'" )
                .toString();
    }
    // -------|  Parsing  |----------------------
    static public List < Gis > parseFile ( final String path )
    {
        ArrayList < Gis > list = new ArrayList <>();
        DateTimeFormatter f = DateTimeFormatter.ofPattern( "MM/dd/uuuu" );
        try
        {
            Reader reader = new FileReader( path );
            CSVFormat format = CSVFormat.TDF.withHeader( Gis.FIELD.class ).withFirstRecordAsHeader().withTrim().withDelimiter( '|' ); // Must pass a `char` to `withDelimiter` not a `String`, so use single-quote not double-quote.
            Iterable < CSVRecord > records = format.parse( reader );
            for ( CSVRecord record : records )
            {
                // FEATURE_ID|FEATURE_NAME|FEATURE_CLASS|STATE_ALPHA|STATE_NUMERIC|COUNTY_NAME|COUNTY_NUMERIC|PRIMARY_LAT_DMS|PRIM_LONG_DMS|PRIM_LAT_DEC|PRIM_LONG_DEC|SOURCE_LAT_DMS|SOURCE_LONG_DMS|SOURCE_LAT_DEC|SOURCE_LONG_DEC|ELEV_IN_M|ELEV_IN_FT|MAP_NAME|DATE_CREATED|DATE_EDITED
                Integer FEATURE_ID = Integer.valueOf( record.get( FIELD.FEATURE_ID ) );
                String FEATURE_NAME = record.get( FIELD.FEATURE_NAME );
                String FEATURE_CLASS = record.get( FIELD.FEATURE_CLASS );
                String STATE_ALPHA = record.get( FIELD.STATE_ALPHA );
                String STATE_NUMERIC = record.get( FIELD.STATE_NUMERIC );
                String COUNTY_NAME = record.get( FIELD.COUNTY_NAME );
                String COUNTY_NUMERIC = record.get( FIELD.COUNTY_NUMERIC );
                String PRIMARY_LAT_DMS = record.get( FIELD.PRIM_LONG_DMS );
                String PRIM_LONG_DMS = record.get( FIELD.PRIM_LONG_DMS );
                BigDecimal PRIM_LAT_DEC = record.get( FIELD.PRIM_LAT_DEC ).isBlank() ? null : new BigDecimal( record.get( FIELD.PRIM_LAT_DEC ) );
                BigDecimal PRIM_LONG_DEC = record.get( FIELD.PRIM_LONG_DEC ).isBlank() ? null : new BigDecimal( record.get( FIELD.PRIM_LONG_DEC ) );
                String SOURCE_LAT_DMS = record.get( FIELD.SOURCE_LAT_DMS );
                String SOURCE_LONG_DMS = record.get( FIELD.SOURCE_LONG_DMS );
                BigDecimal SOURCE_LAT_DEC = record.get( FIELD.SOURCE_LAT_DEC ).isBlank() ? null : new BigDecimal( record.get( FIELD.SOURCE_LAT_DEC ) );
                BigDecimal SOURCE_LONG_DEC = record.get( FIELD.SOURCE_LONG_DEC ).isBlank() ? null : new BigDecimal( record.get( FIELD.SOURCE_LONG_DEC ) );
                Integer ELEV_IN_M = record.get( FIELD.ELEV_IN_M ).isBlank() ? null : Integer.valueOf( record.get( FIELD.ELEV_IN_M ) );
                Integer ELEV_IN_FT = record.get( FIELD.ELEV_IN_FT ).isBlank() ? null : Integer.valueOf( record.get( FIELD.ELEV_IN_FT ) );
                String MAP_NAME = record.get( FIELD.MAP_NAME );
                LocalDate DATE_CREATED = record.get( FIELD.DATE_CREATED ).isBlank() ? null : LocalDate.parse( record.get( FIELD.DATE_CREATED ) , f );
                LocalDate DATE_EDITED = record.get( FIELD.DATE_EDITED ).isBlank() ? null : LocalDate.parse( record.get( FIELD.DATE_EDITED ) , f );
                Gis gis = new Gis( FEATURE_ID , FEATURE_NAME , FEATURE_CLASS , STATE_ALPHA , STATE_NUMERIC , COUNTY_NAME , COUNTY_NUMERIC , PRIMARY_LAT_DMS , PRIM_LONG_DMS , PRIM_LAT_DEC , PRIM_LONG_DEC , SOURCE_LAT_DMS , SOURCE_LONG_DMS , SOURCE_LAT_DEC , SOURCE_LONG_DEC , ELEV_IN_M , ELEV_IN_FT , MAP_NAME , DATE_CREATED , DATE_EDITED );
                list.add( gis );
            }
        } catch ( FileNotFoundException e )
        {
            e.printStackTrace();
        } catch ( IOException e )
        {
            e.printStackTrace();
        }
        list.trimToSize();
        return list;
    }
    // ---------|  Demo (psvm)  |------------------------------------------
    public static void main ( String[] args )
    {
        if ( false ) // Experiment on a small file, a subset of data. If that works, run the huge file.
        {
            String path = "/Users/basilbourque/gis-small.txt";
            List < Gis > list = Gis.parseFile( path );
            System.out.println( "list.size(): " + list.size() );
            System.out.println( "list: " + list );
        } else
        {
            String path = "/Users/basilbourque/gis.txt";
            List < Gis > list = Gis.parseFile( path );
            System.out.println( "list.size(): " + list.size() );
            System.out.println( "list.sublist( 0 , 10 ): " + list.subList( 0 , 10 ) );
            System.out.println( "list.sublist (last 10): " + list.subList( list.size()-10 ,list.size()) );
        }
    }
}

运行时。

list.size((:122669

list.sublist(0,10(:[gis {feature_id ='2928'|feature_name ='cibola桥'},gis {feature_id ='6185'|feature_name ='帝国国家野生动物保护区'},gis {feature_id ='8164'|feature_name ='Mohave Canyon'},gis {feature_id ='8174'|feature_name ='Mohave Valley'},GIS {feature_id ='9144'|feature_name ='palo verde dam'},gis {feature_id ='9146'|feature_name ='Palo Verde Intake'},GIS {feature_id ='9227'|feature_name ='Parker Valley'},GIS {feature_id ='12628'|feature_name ='topock峡谷'},gis {feature_id ='14114'|feature_name ='Yuma Main Canal'},GIS {feature_id ='22751'|feature_name ='cibola国家野生动物保护区'}

list.sublist(最后10(:[gis {feature_id ='27833610'|feature_name ='海军陆战队招募仓库邮局'},gis {feature_id ='27833611'|feature_name ='mcas miramar邮局'},gis {feature_id ='27833612'|feature_name ='Mount McCoy邮局'},gis {feature_id ='27833613'|feature_name ='NAS North Island邮局'},GIS {feature_id ='27833614'|feature_name ='pala邮局'},gis {feature_id ='27833615'|feature_name ='Pinon Hills邮局'},GIS {feature_id ='27833616'|feature_name ='yermo邮局'},gis {feature_id ='27833617'|feature_name ='联邦covina邮局'},gis {feature_id ='27833618'|feature_name ='montalvo邮局'},gis {feature_id ='27833619'|feature_name ='Beverly Hills邮局'}]

在实际工作中,我会将解析的内容移到其自己的类中,将Gis类仅用于数据验证和存储。

最新更新