Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV Reader not working #5

Open
heinzwilli opened this issue Jul 12, 2015 · 3 comments
Open

CSV Reader not working #5

heinzwilli opened this issue Jul 12, 2015 · 3 comments
Assignees
Labels

Comments

@heinzwilli
Copy link

Hi,
in your commit "Better management for color management, update for csv management" you changed the CSVReader. In src/json/converter/csv/CSVReader.java function readRecord() you changed

boolean filter = (prop!=null?applyFilter(aRecordNumber,prop):true); 

to

boolean filter = (prop!=null?applyFilter(aRecordNumber,prop):false);

this caused the function

TopojsonApi.shpToTopojsonFile("./data/MA.shp", "nad83:2001",
                    "./web/topojson_10.json", 
                    "MA", 
                    10, 
                    4, 
                    false);

to skip reading all the records.

@bouviervj
Copy link
Owner

Yes, sorry about that , if I recall well , you should have a dbf file associated with the shp file that maps record # to data. This is what defines prop field. In fact the code you highlight is in ShpFileReader.java . I have set the value to false to optimize the parsing of big shp files. As you can merge associated data (dbf content) with csv files, you can have a subset of record # to filter shape records from the shape file.
This can be used to filter element that have no prop on large files.
Let me know if your usage of this method relies only on shp file, meaning you'll never have the dbf attached file, so that I will try to figure out how to bypass this in defining this boolean.

@heinzwilli
Copy link
Author

I only had a .shp file and no .dbf file. Your test shapefile "./data/MA.shp" which has no .dbf file isn't working, too.

@bouviervj bouviervj self-assigned this Jul 14, 2015
@bouviervj
Copy link
Owner

Should be solved with this commit . let me know

@bouviervj bouviervj added the bug label Jul 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants